General Timers
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
211
10.4.2.4
TIMx Status Register (TIMx_SR)
Name:
TIM4 status register
Address offset:
0x0C
Reset value:
0x80000000
Read/write access:
read/write
31
30
29
28
27
…
5
4
3
2
1
0
UG_DONE
RSVD
CC0IF
UIF
R
R/W1C
R/W1C
Bit
Name
Access
Reset Description
31
UG_DONE
R
1
UG operation status
This bit is cleared by hardware when the UG bit in the TIMx_EGR register is set. When
the UG operation is done, hardware set this bit to ‘1’. So, software can poll this bit to
see the UG operation status.
30:2
RSVD
N/A
-
Reserved
1
CC0IF
R/W1C
0
Capture/compare 0 interrupt flag
If channel CC0 is configured as pulse mode 0, this bit is set when TRGI is
transferred to inactive level from active level.
If channel CC0 is configured as pulse mode 1, this flag is set by hardware when
the counter overflows. It is cleared by software.
0
UIF
R/W1C
0
Update interrupt flag.
10.4.2.5
TIM
x
Event Generation Register (TIM
x
_EGR)
Name:
TIM4 event generation register
Address offset:
0x10
Reset value:
0x00000000
Read/write access:
write
31
30
29
28
…
5
4
3
2
1
0
RSVD
CC
0
G
UG
W
W
Bit
Name
Access Reset Description
31:2
RSVD
N/A
-
Reserved
1
CC0G
W
-
Capture/compare 1 generation
This bit is set by software in order to generate an event, it is automatically cleared by
hardware.
0: No action.
1: A capture/compare event is generated on channel 1.
The current value of the counter is captured in the TIMx_CCR0 register. The CC0IF flag is set,
the corresponding interrupt is sent if enabled.
0
UG
W
-
Update generation
0: No action.
1: Re-initialize the counter and generate an update of the registers. Note that the
prescaler counter is cleared too, anyway the prescaler ratio isn’t affected.
10.4.2.6
TIMx Counter Register (TIMx_CNT)
Name:
TIM4 counter register
Address offset:
0x14
Reset value:
0x00000000
Read/write access:
read/write
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03