
Rev. 1.00
194 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
13 General-Purpose T
imer (GPTM)
13 General-Purpose T
imer (GPTM)
Channel Controller
The GPTM has four independent channels which can be used as capture inputs or compare match
outputs. Each capture input or 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 the
preload register.
When used in the input capture mode, the counter value is captured into the CHxCCR shadow
register first and then transferred into the CHxCCR preload register when the capture event occurs.
When used in the compare match output mode, the contents of the CHxCCR preload register is
copied into the associated shadow register, the counter value is then compared with the register
value.
CHxCCR
(Preload Register)
CHxCCR
(Shadow Register)
APB Bus Interface
Capture
Controller
Capture
Capture Transfer
Compare
Controller
Compare Transfer
Read CHxCCR
CHxCCS
CHxCCS
CHxCCG
CHxPRE
CHxE
CHxPSC
Write CHxCCR
Update Event
CHxCCR
TM_CNT
Figure 42. Capture / Compare Block Diagram