Download Print this page
Infineon STM Interrupt 1 Manual

Infineon STM Interrupt 1 Manual

Interrupt generation via stm trigger, aurix tc2xx microcontroller training

Advertisement

Quick Links

STM_Interrupt_1
Interrupt generation via STM trigger
AURIX™ TC2xx Microcontroller Training
V1.0.0
Please read the Important Notice and Warnings at the end of this document

Advertisement

loading

Summary of Contents for Infineon STM Interrupt 1

  • Page 1 STM_Interrupt_1 Interrupt generation via STM trigger AURIX™ TC2xx Microcontroller Training V1.0.0 Please read the Important Notice and Warnings at the end of this document...
  • Page 2: Scope Of Work

    The value is set to trigger the interrupt every 500 ms; at each interrupt an LED is toggled. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 3 › The comparison is flexible in terms of bit sets. Any of the 64 bits of the STM can be selected for comparison. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 4: Hardware Setup

    Hardware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC-Step. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 5 Inside the function initPeripherals(), the port pin is configured to push-pull output mode using the function IfxPort_setPinMode(). During program execution, inside the interrupt service routine isrSTM(), the LED is switched on and off using the function IfxPort_setPinState(). 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 6 – to define which service provider is responsible for handling the interrupt. This can be any of the available CPUs or the DMA. The above functions can be found in the iLLD header IfxStm.h. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 7 Instructs the STM to raise the next interrupt after a certain amount of time by updating its compare register with the function IfxStm_increaseCompare(). › Toggles the LED by changing the state of the port pin using the function IfxPort_setPinState(). 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 8 Run and Test After code compilation and flashing the device, observe the LED D107 (1), which should be blinking. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 9 More code examples can be found on the GIT repository: › https://github.com/Infineon/AURIX_code_examples › For additional trainings, visit our webpage: › https://www.infineon.com/aurix-expert-training › For questions and support, use the AURIX™ Forum: › https://www.infineonforums.com/forums/13-Aurix-Forum 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 10 Infineon Technologies in in personal injury. customer’s applications. The data contained in this document is exclusively intended for technically trained staff.