EasyManua.ls Logo

Infineon GTM TIM Capture 1 - Measuring PWM Frequency and Duty Cycle; TIM Measurement Functions

Infineon GTM TIM Capture 1
13 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Implementation
Measuring PWM frequency and duty cycle
The measurement of the PWM frequency and duty cycle is done by calling the
function measure_PWM() containing the following steps:
Update the measured PWM data by calling the iLLD function
IfxGtm_Tim_In_update()
Get the PWM period in seconds with the iLLD function
IfxGtm_Tim_In_getPeriodSecond()
Calculate the PWM frequency with the formula: frequency(Hz) = 1 / period(s)
Get the PWM duty cycle by calling the iLLD function
IfxGtm_Tim_In_getDutyPercent()
All the iLLD functions above are provided by the iLLD header IfxGtm_Tim_In.h
10
2020-01-17 Copyright © Infineon Technologies AG 2020. All rights reserved.

Related product manuals