
Rev. 1.00
260 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)
Update Management
The Update event is used to update the CRR, the PSCR, the CHxACR and the CHxCR values
from the actual registers to the corresponding shadow registers. An update event occurs when the
counter overflows or underflows, the software update control bit is triggered or an update event
from the slave controller is generated.
The UEVDIS bit in the CNTCFR register can determine whether the update event occurs or
not. When the update event occurs, the corresponding update event interrupt will be generated
depending upon whether the update event interrupt generation function is enabled or not by
configuring the UGDIS bit in the CNTCFR register. For more detailed description, refer to the
UEVDIS and UGDIS bit definition in the CNTCFR register.
UEVDIS
UEV (Update PSCR, CRR,
CHxCR, CHxACR Shadow
Registers)
Slave Restart mode
UGDIS
Counter Overflow / Underflow
UEVDIS
UEV interrupt
UEVG
Slave Restart mode
Update Event Management
Update Event Interrupt Management
UEVG
Counter Overflow / Underflow
Figure 82. Update Event Setting Diagram
Single Pulse Mode
Once the timer is set to operate in the single pulse mode, it is not necessary to set the timer enable
bit TME in the CTR register to 1 to enable the counter. The trigger to generate a pulse can be
sourced from the STI signal rising edge or by setting the TME bit to 1 using software. Setting the
TME bit to 1 or a trigger from the STI signal rising edge can generate a pulse and then keep the
TME bit at a high state until the update event occurs or the TME bit is written to 0 by software.
If the TME bit is cleared to 0 using software, the counter will be stopped and its value held. If the
TME bit is automatically cleared to 0 by a hardware update event, the counter will be reinitialized.