Implementation
Configuring the TOM
The configuration of the TOM is done once in the setup phase by calling the
initialization function
initGtmTom()
with the following steps:
›
Enable the GTM by calling the function
IfxGtm_enable()
.
›
The function
IfxGtm_Tom_Timer_initConfig()
initializes an instance of the
structure
IfxGtm_Tom_Timer_Config
with its default values.
›
The
IfxGtm_Tom_Timer_Config
structure allows to set the following parameters
to initialize the module:
–
tom
– Set TOM 1
–
timerChannel
– Set channel 0 of TOM 1
–
clock
– Select CMU clock 0
–
base.frequency
– Set timer frequency to 2 Hz (Interrupt every 500 ms)
–
base.isrPriority
– Interrupt Service Routine priority
–
base.isrProvider
– Interrupt Service Routine provider
5
2019-10-17
Copyright © Infineon Technologies AG 2019. All rights reserved.