PWM calculation period and duty in LPC546

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PWM calculation period and duty in LPC546

801 次查看
k_sunilgupta
Contributor II

Is there any calculation for generating the PWM of 20KHz.

my core clock is 180MHz.

i am using LPC54606J512BD100 micro controller.

 

If anyone know this please reply.

 

@mgnxp @nxp16 

0 项奖励
回复
1 回复

794 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Do you use CTimer module or SCTimer/PWM module to generate the PWM signal? If you use CTimer to generate the PWM signal, as you know that the PWM Reset match register will be

180MHz/20KHz=9K

so it is okay to set the match register as 9000 which reset the counter.

If you use SCTimer/PWM module, you can set the limit register as 9000, which sets up the PWM frequency.

Hope it can help you

BR'

XiangJun Rong

 

 

0 项奖励
回复