Hi @ccc_clive ,
Thanks for your interest in NXP MIMXRT series!
PWM only provides 16 bit counter, we can't do a 32bit counter using hardware alone. Please refer to this post: 已解决: i.MX.RT1052 - Is it possible to create a 32bit PWM module using 2 quad timers? - NXP Community
Maybe you can design the software to realize, eg, when the counter 16 bit is overflowed, then in the overflowed interrupt, you use a software count flag to record it. when the 16 bit overflow 0xffff times, it means the counter 32 bit is reached.
Besides this, actually, PIT is the 32bit counter, maybe you can use the PIT associate with the GPIO to realize the PWM generation.
Wish it helps you!
Best regards,
Gavin
Hi @ccc_clive ,
Thanks for your interest in NXP MIMXRT series!
PWM only provides 16 bit counter, we can't do a 32bit counter using hardware alone. Please refer to this post: 已解决: i.MX.RT1052 - Is it possible to create a 32bit PWM module using 2 quad timers? - NXP Community
Maybe you can design the software to realize, eg, when the counter 16 bit is overflowed, then in the overflowed interrupt, you use a software count flag to record it. when the 16 bit overflow 0xffff times, it means the counter 32 bit is reached.
Besides this, actually, PIT is the 32bit counter, maybe you can use the PIT associate with the GPIO to realize the PWM generation.
Wish it helps you!
Best regards,
Gavin