HELLO EVERYONE,
I'm testing the PWM using EMIOS and I facing some doubts:
Informations:
CLK is 160MHz.
and for pwm frequency calculation i used
PWM peripheral clock = CORE_CLK/ Core_clk_divider/ Global_prescaler/ Clock_prescaler
but my required output is getting wrong. after i research in nxp community i got two different formulas,
1. PWM frequency = CORE_CLK / global prescaler / internal prescaler / (period [ticks] x 2)
Period[ticks] = CORE_CLK / PERIOD_FREQ / 2
2. PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)
which one is correct formula for calculation of frequency and duty cycle.
@VaneB @Robin_Shen @Irina_Costachescu
Thanks in advance.
ES