LPC11A14 PWM cycle lenght

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

LPC11A14 PWM cycle lenght

跳至解决方案
1,776 次查看
jespermadsen
Contributor III

I would like to know what determine witch match register is used for cycle lenght in the PWM function.

In the user manual chap. "12.7.12 PWM Control Register (PWMC)" it says:

"The timer is reset by the match register that is configured to set the PWM cycle length."

 

How is a match register configured to set the PWM cycle lenght?

Best regards

Jesper M. Madsen

0 项奖励
回复
1 解答
1,771 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jesper,

Regarding your question, any match register can control the cycle length of PWM signal for the CTimer, pls refer to the 18.7.6 Match Control Register (TMR16B0MCR and TMR16B1MCR) in UM10398.pdf, for example, if the MR0S bit is set in the TMR16B0MCR register, when the counter reaches the match0 register TMR16B0MR0, the counter will reset to zero and begins a new PWM cycle, in the case, all the other match register TMR16B0MR1/2/3 must be less than the value of TMR16B0MR0 so that the PWM signal can not be always LOW. In the case, TMR16B0MR0 determines the PWM cycle time.

For example, if the MR1S bit is set in the TMR16B0MCR register, when the counter reaches the match1 register TMR16B0MR1, the counter will reset to zero and begins a new PWM cycle, in the case, all the other match register TMR16B0MR0/2/3 must be less than the value of TMR16B0MR1. In the case, TMR16B0MR1 determines the PWM cycle time.

Hope it can help you

BR

XiangJun Rong

在原帖中查看解决方案

2 回复数
1,772 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jesper,

Regarding your question, any match register can control the cycle length of PWM signal for the CTimer, pls refer to the 18.7.6 Match Control Register (TMR16B0MCR and TMR16B1MCR) in UM10398.pdf, for example, if the MR0S bit is set in the TMR16B0MCR register, when the counter reaches the match0 register TMR16B0MR0, the counter will reset to zero and begins a new PWM cycle, in the case, all the other match register TMR16B0MR1/2/3 must be less than the value of TMR16B0MR0 so that the PWM signal can not be always LOW. In the case, TMR16B0MR0 determines the PWM cycle time.

For example, if the MR1S bit is set in the TMR16B0MCR register, when the counter reaches the match1 register TMR16B0MR1, the counter will reset to zero and begins a new PWM cycle, in the case, all the other match register TMR16B0MR0/2/3 must be less than the value of TMR16B0MR1. In the case, TMR16B0MR1 determines the PWM cycle time.

Hope it can help you

BR

XiangJun Rong

1,767 次查看
jespermadsen
Contributor III

I see.. Thanks a lot..

0 项奖励
回复