LPC11A14 PWM cycle lenght

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC11A14 PWM cycle lenght

Jump to solution
1,012 Views
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 Kudos
1 Solution
1,007 Views
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

View solution in original post

2 Replies
1,008 Views
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,003 Views
jespermadsen
Contributor III

I see.. Thanks a lot..

0 Kudos