Implementation
Configuring the TIM
The configuration of the TIM is done by calling the initialization function init_TIM_module(),
containing the following steps:
› Enable the GTM by calling the function IfxGtm_enable()
› Enable the CMU clock 0 by calling the function IfxGtm_Cmu_enableClocks()
› Initialize an instance of the IfxGtm_Tim_In_Config structure with the default parameters by
calling the iLLD function IfxGtm_Tim_In_initConfig()
› The IfxGtm_Tim_In_Config structure allows the setting of multiple parameters in order to
initialize the module, including the following:
– filter.inputPin – Selection of the input port pin of the TIM (port pin P02.0 in this example)
– filter.inputPinMode – Selection of the input mode for the input port pin of the TIM
(IfxPort_InputMode_pulldown in this example)
› After setting the configuration parameters, the function IfxGtm_Tim_In_init() applies the
user configuration to the module
All the functions used for the configuration of the TIM are provided by the iLLD header
IfxGtm_Tim_In.h.
6
2020-01-17 Copyright © Infineon Technologies AG 2020. All rights reserved.