Are PWM modules of LPC11U14 buffered??

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

Are PWM modules of LPC11U14 buffered??

775 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HugoKrajnc on Mon Aug 25 04:46:59 MST 2014
Hi all,

I'm currently using the PWM functionalities of the 32 bit counters of a LPC11U14, and I've been assuming this far that the parameters of this module (mainly, period and duty cycle, which you set by means of the match values) were updated only after the current period is finished. This would ensure that there are no glitches or weird timing behaviors when trying to update any of these values. I've seen this functionality in many other micros.

However, it would seem that this is not the case, is that correct? I.e. that these match values (when in PWM mode) are not buffered? I'm noticing this because during my code execution I get different behaviors depending on in which part of the pulse I modify the parameters.

Could anyone please clarify which case (i.e.buffered / not buffered) it is?

Regards,,

Hugo
Labels (1)
0 Kudos
Reply
2 Replies

753 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HugoKrajnc on Sun Aug 31 23:20:07 MST 2014
Great, that's actually exactly what I'm doing, but due to timing constraints I'm talking about <2% of margin time to do this update, so it's making my life a little bit more complicated.

Anyway, good to confirm my suspicions.

Thanks!
0 Kudos
Reply

753 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DF9DQ on Sun Aug 31 22:40:32 MST 2014
Hi Hugo,

The PWM timing registers are indeed not buffered.

One option is to introduce a guard band at the upper end of the duty cycle range, and drive the PWM only from say 0...90%. The guard band has to be wide enough to allow you to update the timing register(s) in time before the next cycle begins.

This approach is fine if you're interested in the average output, for instance if the PWM is used to generate DC values. Here the guard band just introduces a scale factor (and some loss of resolution).

Regards,
Rolf
0 Kudos
Reply