Implementation
Configuring the TOM
The configuration of the TOM is done by calling the function generate_PWM() containing the
following steps:
› Enable the FXU clocks by calling the function IfxGtm_Cmu_enableClocks().
› Initialize an instance of the structure IfxGtm_Tom_Pwm_Config with its default values by
calling the function IfxGtm_Tom_Pwm_initConfig() .
› The IfxGtm_Tom_Pwm_Config structure allows to set the following parameters to initialize
the module:
– tom – Selection of the TOM which is counting
– tomChannel – Selection of the channel which is driving the output port pin
– period – Setting of the period for the PWM signal to the desired value
– dutyCycle – Setting of the duty cycle of the PWM signal to the desired value
– pin.outputPin – Selection of the output port pin
– synchronousUpdateEnable – Enabling of Synchronous Update of the timer
– clock – Selection of the clock used for the generation of the PWM
7
2020-01-17 Copyright © Infineon Technologies AG 2020. All rights reserved.