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
Please refer to the discussion in https://community.nxp.com/t5/S32K/PWM-issue/m-p/1763225
Hi @ESAKKI_MBD,
Could you please check the following article posted on our community (link)?
It provides all the necessary information on how to configure and use the PWM component in MBDT applications (Section 4. PWM Configuration). It also includes the explained formulas for computing the Frequency and Period of generated PWM signals, inside Section 4.4 MCL. However, I would recommend going through the entire article for more details on PWM Peripheral, Pins, Clocks and Interrupts configuration.
Please let us know if this helps or if any additional information/guidance is needed from our side.
Thanks,
Irina