background image

Implementation

Configure the STM

Configuration of the STM is done inside the function 

initSTM() 

by initializing an 

instance of the 

IfxStm_CompareConfig

structure with default values through the 

function 

IfxStm_initCompareConfig()

Then, the following parameters are modified:

ticks

– the total amount of ticks to count before the interrupt generation. 

triggerPriority 

– priority of the interrupt generated by the STM on compare match. 

It can be a value from 0 to 255, with 0 meaning interrupt is disabled and 255 is the 
highest priority.

typeOfService 

– 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

.

6

2019-10-17

Copyright © Infineon Technologies AG 2019. All rights reserved.

Содержание STM Interrupt 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 STM_Interrupt_1 Interrupt generation via STM trigger Please read the Important Notice and Warnings at the end of this document...

Страница 2: ...m Timer STM module counts up to a configured compare value when it reaches the specific value it triggers an interrupt and resets its counter value The value is set to trigger the interrupt every 500...

Страница 3: ...precision and long period Among other features the STM has the capability to generate interrupts when its count reaches a predefined compare value The comparison is flexible in terms of bit sets Any o...

Страница 4: ...Hardware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC Step 4 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved...

Страница 5: ...er IfxPort h 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...

Страница 6: ...cks to count before the interrupt generation triggerPriority priority of the interrupt generated by the STM on compare match It can be a value from 0 to 255 with 0 meaning interrupt is disabled and 25...

Страница 7: ...the macro IFX_INTERRUPT isr vectabNum priority When triggered the ISR Instructs the STM to raise the next interrupt after a certain amount of time by updating its compare register with the function If...

Страница 8: ...Run and Test After code compilation and flashing the device observe the LED D107 1 which should be blinking 1 8 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved...

Страница 9: ...www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questi...

Страница 10: ...of the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology de...

Отзывы: