Download Print this page

Infineon GPT12 Training page 7

Pwm generation 1 for kit_aurix_tc297_tft
Hide thumbs Also See for GPT12:

Advertisement

Implementation
Reload Values calculation example
Calculating the correct reload value to generate a PWM signal, depending on the given
frequency f and duty cycle, is done in the initialization function initGpt12PWM():
Get the GPT12 module base frequency ��
IfxGpt12_getModuleFrequency()
Calculate the timer frequency with the following formula:
��
����������
The GPT1 block prescaler is set to
The timer prescaler is set to
Calculate dutyUpTime and dutyDownTime with the following formulas:
�������������������� =
2020-06-05
=
GPT1_BLOCK_PRESCALER × TimerInputPrescaler
IfxGpt12_Gpt1BlockPrescaler_32,
IfxGpt12_TimerInputPrescaler_32,
������������������
��
×
����������
100
��
Copyright © Infineon Technologies AG 2020. All rights reserved.
by calling the iLLD function
������
��
������
������������������������ =
��
is divided by 32
������
��
is divided by 32
������
������������������
��
× 1 −
����������
��
100
7

Advertisement

loading