
Rev. 1.00
256 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
14 Pulse W
idth Modulator (PWM)
14 Pulse W
idth Modulator (PWM)
Channel Controller
The PWM has four independent channels which can be used as compare match outputs. Each
compare match output channel is composed of a preload register and a shadow register. Data access
of the APB bus is always implemented by reading / writing preload register.
When used in the compare match output mode, the contents of the CHxCR preload register is copied
into the associated shadow register; the counter value is then compared with the register value.
CHxCR
(Preload Register)
CHxCR
(Shadow Register)
APB Bus Interface
Compare
Controller
Compare Transfer
CHxPRE
Write CHxCR
Update Event
CNTR
Figure 75. Compare Block Diagram
Output Stage
The PWM has four channels for compare match, single pulse or PWM output function. The channel
output PWM_CHx is controlled by the CHxOM, CHxP and CHxE bits in the corresponding
CHxOCFR, CHPOLR and CHCTR registers.
Output Mode
Controller
CHxOM
CHxE
PWM_CHx
CHxCR
CNTR
CHxOREF
f
CLKIN
CHxCMP Event
Output Enable
Controller
CHxP
CHxOREF
x: 0 ~ 3
Figure 76. Output Stage Block Diagram