Figure 6.8-16 Center Loading In Up-Down-Count Mode - Nuvoton ISD94124BYI Technical Reference Manual

Isd arm cortex-m4f soc
Table of Contents

Advertisement

point 1
PERIOD
PERIOD DATA0
PBUF
CMPDAT
CMPBUF
CMPDAT DATA0
PERIOD DATA1
PERIOD DATA0
PERIOD DATA2
CMPDAT DATA1
CMPDAT DATA0
CMPDAT DATA2
CMPU
CMPD
6.8.5.12 PWM Counter Operation mode
The PWM counter supports two operation modes: One-shot mode and Auto-reload mode. PWM
counter will operate in One-shot mode if CNTMODEn (PWM_CTL1[21:16]) bit is set to 1, and
operate in Auto-reload mode if set to 0.
In One-shot mode, CMPDAT and PERIOD registers should be written first and then set CNTENn
(PWM_CNTEN[5:0]) bit as 1 to enable PWM prescaler and counter start running. After PWM
counter counted a period, counter value will keep in zero.
User can re-start next one-shot by writing new value to CMP(PWM_CMPDATn[15:0]) bits. If one-
shot counter still running, to update CMPDAT register will cause next one-shot as continuous one-
shot. Besides, to write CMPDAT register twice under continuous one-shot operation, latest value in
CMPDAT register is valid at next one-shot period and only generate one-shot pulse once. Figure
6.8-17 is an example and following is steps sequence.
1. Software writes PERIOD DATA1 and hardware immediately loading PERIOD DATA1 to PBUF
at point 1.
2. Software writes CMPDAT DATA1 which is equal to CMPDAT DATA0 at point 2 and hardware
immediately loading CMPDAT DATA1 to CMPBUF, this event also trigger one-shot.
3. Software writes CMPDAT DATA2 and re-trigger next one-shot (continuous one-shot) at point
3.
4. Software writes CMPDAT DATA3 to cover CMPDAT DATA2 and re-trigger next one-shot at
point 4.
5. Period loading CMPDAT DATA3 to CMPBUF at point 5.
6. There are no new CMPDAT write in the previous period, and the counter value is kept as zero
at point 6.
Sep 9, 2019
ISD94100 Series Technical Reference Manual
point 2 point 3 point 4 point 5
PERIOD DATA1
PERIOD DATA0
CMPDAT DATA1
CMPDAT DATA1

Figure 6.8-16 Center Loading in Up-Down-Count Mode

Page 417 of 928
point 6
point 7 point 8
PERIOD DATA2
PERIOD DATA1
CMPDAT DATA2
CMPDAT DATA2
CNT
PERIOD DATA2
Note:
Write
Load
Rev1.09

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents