
NUC126
Aug. 08, 2018
Page
424
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
CMPDAT DATA0
CMPU
CMPDAT DATA1
PERIOD DATA0
PERIOD DATA1
PERIOD DATA2
CNT
Write
Load
Note:
CMPDAT
PERIOD
PERIOD DATA0
PERIOD DATA1
CMPDAT DATA1
PBUF
PERIOD DATA0
PERIOD DATA1
CMPBUF
CMPDAT DATA1
PERIOD DATA2
PERIOD DATA2
point 1
point 2
point 3 point 4
point 5
point 6
Figure 6.13-12 Period Loading in Up-Count Mode
6.13.5.9 Immediately Loading Mode
If the IMMLDENn (PWM_CTL0[21:16]) bit is set to 1, PWM operates at immediately loading mode. In
immediately
loading
mode,
when
user
update
CLKPSC(PWM_CLKPSCn_m[11:0]),
PERIOD(PWM_PERIODn[15:0]) or CMP(PWM_CMPDATn[15:0]), PERIOD or CMPDAT will be load to
active
CPSCBUF
(PWM_CPSCBUFn_m[15:0]),
PBUF
(PWM_PBUFn[15:0])
or
CMPBUF
(PWM_CMPBUFn[15:0]) after current counter count is completed. If the updated PERIOD value is less
than current counter value, counter will count wraparound. Immediately loading mode has the highest
priority. If IMMLDENn has been set, other loading mode for channel n will become invalid. Figure
6.13-13 shows an example and its steps sequence is described below.
1. Software writes CMPDAT DATA1 and hardware immediately loading CMPDAT DATA1 to
CMPBUF at point 1.
2. Software writes PERIOD DATA1 which is greater than current counter value at point 2; counter
will continue counting until equal to PERIOD DATA1 to finish a period loading.
3. Software writes PERIOD DATA2 which is less than the current counter value at point 3;
counter will continue counting to its maximum value 0xFFFF and count wraparound from 0 to
PERIOD DATA2 to finish this period loading.