imxrt1052 32bit pwm

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
282件の閲覧回数
ccc_clive
Contributor III

can i use pwm with 32it count?

0 件の賞賛
返信
1 解決策
256件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
257件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信