![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 264](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630264.webp)
www.geehy.com Page 263
State register (TMRx_STS)
Offset address: 0x10
Reset value: 0x0000
Field
Name
R/W
Description
0
UIFLG RC_W0
Update Event Interrupt Generate Flag
0: Update event interrupt does not occur
1: Update event interrupt occurs
When the counter value is reloaded or reinitialized, an update event will
be generated. The bit is set to 1 by hardware and cleared by software;
update events are generated in the following situations:
(1) UD=0 on TMRx_CTRL1 register, and when the value of the repeat
counter overruns/underruns, an update event will be generated;
(2) URSEL=0 and UD=0 on TMRx_CTRL1 register, configure UG = 1 on
TMRx_CEG register to generate update event, and the counter needs to
be initialized by software;
(3) URSEL=0 and UD=0 on TMRx_CTRL1 register, generate update
event when the counter is initialized by trigger event.
15:1
Reserved
Control event generation register (TMRx_CEG)
Offset address: 0x14
Reset value: 0x0000
Field
Name
R/W
Description
0
UEG
W
Update Event Generate
0: Invalid
1: Initialize the counter and generate the update event
This bit is set to 1 by software, and cleared by hardware.
Note: When an update event is generated, the counter of the prescaler will
be cleared, but the prescaler factor remains unchanged.
In the count-down
mode, the counter reads the value of TMRx_AUTORLD; in center-aligned
mode or count-up mode, the counter will be cleared to 0.
15:1
Reserved
Note: The state of external I/O pin connected to the standard OCx channel
depends on the state of the OCx channel and the GPIO and AFIO registers.
Counter register (TMRx_CNT)
Offset address: 0x24
Reset value: 0x0000
Field
Name
R/W
Description
15:0
CNT
R/W
Counter Value
Prescaler register (TMRx_PSC)
Offset address: 0x28
Reset value: 0x0000