PWM calculation period and duty in LPC546

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PWM calculation period and duty in LPC546

1,448件の閲覧回数
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 返信

1,441件の閲覧回数
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 件の賞賛
返信