寄存器
请查看
寄存器访问类型
,了解 Access 列缩写的含义。
Base Address: 0x41100200
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
varies |
Users can configure and observe the counter operation. |
|
004h |
varies |
This register is about the update operation. |
|
008h |
varies |
||
00Ch |
varies |
||
010h |
varies |
This register is about the update operation, and is user-defined. |
|
014h |
varies |
This is timer count register. |
|
018h |
varies |
This is prescaler value register. |
|
01Ch |
varies |
This is auto-reload value register. |
|
024h |
varies |
This is the register about input capture configuration and the data of capture. |
|
028h |
varies |
||
02Ch |
R/W |
REG_TIM_EN
Name: TIM enable register
Size: 32
Address offset: 000h
Read/write access: varies
Users can configure and observe the counter operation.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:17 |
RSVD |
- |
Reserved |
|
16 |
CNT_EN |
R |
0x0 |
Counter working status
|
15:9 |
RSVD |
- |
Reserved |
|
8 |
CEN |
R |
0x0 |
Counter run status
|
7:2 |
RSVD |
- |
Reserved |
|
1 |
CNT_STOP |
WA0 |
0x0 |
Disable the counter Poll CNT_RUN to see the counter status. If CNT_RUN is 0, it means that the counter has been disabled internally. |
0 |
CNT_START |
WA0 |
0x0 |
Enable the counter Poll CNT_RUN to see the counter status. If CNT_RUN is 1, it means that the counter has been enabled internally. |
REG_TIM_CR
Name: TIM control register
Size: 32
Address offset: 004h
Read/write access: varies
This register is about the update operation.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:5 |
RSVD |
- |
Reserved |
|
4 |
ARPE |
R/W |
0x0 |
Enable auto-reload preloading
|
3 |
RSVD |
- |
Reserved |
|
2 |
URS |
R/W |
0x0 |
Update request source
|
1 |
UDIS |
R/W |
0x0 |
Disable UEV Shadow registers keep their values. Otherwise, buffered registers are then loaded with their preload values when UEV happens. |
0 |
RSVD |
- |
Reserved |
REG_TIM_DIER
Name: TIM interrupt enable register
Size: 32
Address offset: 008h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0IE |
R/W |
0x0 |
Enable Capture/Compare 0 interrupt |
0 |
UIE |
R/W |
0x0 |
Enable update interrupt |
REG_TIM_SR
Name: TIM status register
Size: 32
Address offset: 00Ch
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31 |
UG_DONE |
R |
0x1 |
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 |
- |
Reserved |
|
1 |
CC0IF |
RW1C |
0x0 |
Capture/Compare 0 interrupt flag CC0 channel configured as pulse mode 0: This bit is set when TRGI is transferred to inactive level from active level. CC0 channel configured as pulse mode 1: This bit is set by hardware when the counter overflows. It is cleared by software. |
0 |
UIF |
RW1C |
0x0 |
Update interrupt flag |
REG_TIM_EGR
Name: TIM event generation register
Size: 32
Address offset: 010h
Read/write access: varies
This register is about the update operation, and is user-defined.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0G |
WA0 |
0x0 |
Capture/Compare 0 generation This bit is set by software and is automatically cleared by hardware. A Capture/Compare event is generated on channel 0: the current value of the counter is captured in TIM_CCR0 register. The CC0IF flag is set, the corresponding interrupt or request is sent if enabled. |
0 |
UG |
WA0 |
0x0 |
Update generation Re-initialize the counter and generate an update of registers. Note that the prescaler counter is cleared too. (anyway the prescaler ratio is not affected) |
REG_TIM_CNT
Name: TIM counter
Size: 32
Address offset: 014h
Read/write access: varies
This is timer count register.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
CNT |
R |
0x0 |
Counter value |
REG_TIM_PSC
Name: TIM prescaler register
Size: 32
Address offset: 018h
Read/write access: varies
This is prescaler value register.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
PSC |
R/W |
0x0 |
Prescaler value PSC contains the value to be loaded in the actual prescaler register at each UEV (including when the counter is cleared through UG bit of TIM_EGR register). |
REG_TIM_ARR
Name: TIM auto-reload register
Size: 32
Address offset: 01Ch
Read/write access: varies
This is auto-reload value register.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
ARR |
R/W |
0xFFFF |
The value to be loaded in the actual auto-reload register. It can be preloaded by setting ARPE bit in TIM_CR. |
REG_TIM_CCR0
Name: TIM Capture register
Size: 32
Address offset: 024h
Read/write access: varies
This is the register about input capture configuration and the data of capture.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:29 |
RSVD |
- |
Reserved |
|
28 |
CC0PM |
R/W |
0x0 |
CC0 pulse mode
|
27 |
RSVD |
- |
Reserved |
|
26 |
CC0P |
R/W |
0x0 |
CC0 channel configured as output:
CC0 channel configured as input:
|
25 |
RSVD |
- |
Reserved |
|
24 |
CC0E |
R/W |
0x0 |
Enable CC0 |
23:16 |
RSVD |
- |
Reserved |
|
15:0 |
CCR0 |
R/W/ES |
0x0 |
Capture/Compare 0 value CC0 channel configured as pulse mode 0: the pulse width of TRGI CC0 channel configured as pulse mode 1: the pulse number of TRGI when the counter counts from 0 to ARR |
REG_TIM_PULSE_DBC
Name: Timer Pulse DBC Register
Size: 32
Address offset: 028h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:1 |
R_DBC_CYC |
R/W |
0x0 |
DBC cycle |
0 |
R_DBC_FEN |
R/W |
0x0 |
Enable debounce for pulse
|
REG_TIM_PULSE_DUMMY
Name: Timer Pulse Dummy Register
Size: 32
Address offset: 02Ch
Read/write access: R/W
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:0 |
DUMMY |
R/W |
ffffh |
Dummy register |
Base Address: 0x41019200
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
varies |
User can configure and observe the counter operation. |
|
004h |
varies |
This is the register about the update operation. |
|
008h |
varies |
||
00Ch |
varies |
This is the register about timer status. |
|
010h |
varies |
Update generation, user defined |
|
014h |
varies |
||
018h |
varies |
||
01Ch |
varies |
||
024h |
varies |
This is the register about input capture configuration and the data of capture. |
|
028h |
R/W |
REG_TIM_EN
Name: TIM enable register
Size: 32
Address offset: 000h
Read/write access: varies
User can configure and observe the counter operation.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:17 |
RSVD |
- |
Reserved |
|
16 |
CNT_EN |
R |
0x0 |
Counter working status
|
15:9 |
RSVD |
- |
Reserved |
|
8 |
CEN |
R |
0x0 |
Counter run status
|
7:2 |
RSVD |
- |
Reserved |
|
1 |
CNT_STOP |
WA0 |
0x0 |
Disable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 0, it means that the counter has been disabled internally. |
0 |
CNT_START |
WA0 |
0x0 |
Enable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 1, it means that the counter has been enabled internally. |
REG_TIM_CR
Name: TIM control register
Size: 32
Address offset: 004h
Read/write access: varies
This is the register about the update operation.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:5 |
RSVD |
- |
Reserved |
|
4 |
ARPE |
R/W |
0x0 |
Enable auto-reload preloading
|
3 |
RSVD |
- |
Reserved |
|
2 |
URS |
R/W |
0x0 |
Update request source
|
1 |
UDIS |
R/W |
0x0 |
Disable UEV Shadow registers keep their values. Otherwise, buffered registers are then loaded with their preload values when UEV happens. |
0 |
RSVD |
- |
Reserved |
REG_TIM_DIER
Name: TIM interupt enable register
Size: 32
Address offset: 008h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0IE |
R/W |
0x0 |
Enable Capture/Compare 0 interrupt |
0 |
UIE |
R/W |
0x0 |
Enable update interrupt |
REG_TIM_SR
Name: TIM status register
Size: 32
Address offset: 00Ch
Read/write access: varies
This is the register about timer status.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31 |
UG_DONE |
R |
0x1 |
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 sets this bit to '1'. So, software can poll this bit to see the UG operation status. |
30:2 |
RSVD |
- |
Reserved |
|
1 |
CC0IF |
RW1C |
0x0 |
Capture/Compare 0 interrupt flag
|
0 |
UIF |
RW1C |
0x0 |
Update interrupt flag |
REG_TIM_EGR
Name: TIM event generation register
Size: 32
Address offset: 010h
Read/write access: varies
Update generation, user defined
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0G |
WA0 |
0x0 |
Capture/Compare 0 generation This bit is set by software and is automatically cleared by hardware. A Capture/Compare event is generated on channel 0: the current value of the counter is captured in TIM_CCR0 register. The CC0IF flag is set, the corresponding interrupt or request is sent if enabled. |
0 |
UG |
WA0 |
0x0 |
Update generation. Re-initialize the counter and generate an update of registers. Note that the prescaler counter is cleared too. (Anyway the prescaler ratio is not affected) |
REG_TIM_CNT
Name: TIM counter register
Size: 32
Address offset: 014h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
CNT |
R |
0x0 |
Counter value |
REG_TIM_PSC
Name: TIM prescaler register
Size: 32
Address offset: 018h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
PSC |
R/W |
0x0 |
Prescaler value PSC contains the value to be loaded in the actual prescaler register at each UEV (including when the counter is cleared through UG bit of TIM_EGR register). |
REG_TIM_ARR
Name: TIM auto-reload register
Size: 32
Address offset: 01Ch
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
ARR |
R/W |
0xFFFF |
The value to be loaded in the actual auto-reload register. It can be preloaded by setting ARPE bit in TIM_CR. |
REG_TIM_CCR0
Name: TIM Capture register
Size: 32
Address offset: 024h
Read/write access: varies
This is the register about input capture configuration and the data of capture.
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:29 |
RSVD |
- |
Reserved |
|
28 |
CC0PM |
R/W |
0x0 |
CC0 pulse mode
|
27 |
RSVD |
- |
Reserved |
|
26 |
CC0P |
R/W |
0x0 |
CC0 channel configured as output:
CC0 channel configured as input:
|
25 |
RSVD |
- |
Reserved |
|
24 |
CC0E |
R/W |
0x0 |
Enable CC0 |
23:16 |
RSVD |
- |
Reserved |
|
15:0 |
CCR0 |
R/W/ES |
0x0 |
Capture/Compare 0 value CC0 channel configured as pulse mode 0: the pulse width of TRGI CC0 channel configured as pulse mode 1: the pulse number of TRGI when the counter counts from 0 to ARR |
REG_TIM_PULSE_DUMMY
Name: Timer Pulse Dummy Register
Size: 32
Address offset: 028h
Read/write access: R/W
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:0 |
DUMMY |
R/W |
ffffh |
Dummy register |
REGISTER_CONTENTS=RTL8720E
REGISTER_CONTENTS=RTL8720E
REGISTER_CONTENTS=RTL8720E
Base Address: 0x4100A200
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
varies |
||
004h |
varies |
||
008h |
varies |
||
00Ch |
varies |
||
010h |
varies |
||
014h |
varies |
||
018h |
varies |
||
01Ch |
varies |
||
024h |
varies |
REG_TIM_EN
Name: TIM enable register
Size: 32
Address offset: 000h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:17 |
RSVD |
- |
Reserved |
|
16 |
CNT_EN |
R |
0x0 |
Counter working status
|
15:9 |
RSVD |
- |
Reserved |
|
8 |
CEN |
R |
0x0 |
Counter run status
|
7:2 |
RSVD |
- |
Reserved |
|
1 |
CNT_STOP |
WA0 |
0x0 |
Disable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 0, it means that the counter has been disabled internally. |
0 |
CNT_START |
WA0 |
0x0 |
Enable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 1, it means that the counter has been enabled internally. |
REG_TIM_CR
Name: TIM control register
Size: 32
Address offset: 004h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:5 |
RSVD |
- |
Reserved |
|
4 |
ARPE |
R/W |
0x0 |
Enable auto-reload preloading
|
3 |
RSVD |
- |
Reserved |
|
2 |
URS |
R/W |
0x0 |
Update request source
|
1 |
UDIS |
R/W |
0x0 |
Disable UEV. Shadow registers keep their values. Otherwise, buffered registers are then loaded with their preload values when UEV happen. |
0 |
RSVD |
- |
Reserved |
REG_TIM_DIER
Name: TIM interupt enable register
Size: 32
Address offset: 008h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0IE |
R/W |
0x0 |
Enable capture/compare 0 interrupt |
0 |
UIE |
R/W |
0x0 |
Enable update interrupt |
REG_TIM_SR
Name: TIM status register
Size: 32
Address offset: 00Ch
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31 |
UG_DONE |
R |
0x1 |
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 |
- |
Reserved |
|
1 |
CC0IF |
R/W1C/ES |
0x0 |
Capture/compare 0 interrupt flag Cc0 channel configured as pulse mode 0: This bit is set when trgi is transferred to inactive level from active level. Cc0 channel configured as pulse mode 1: This bit is set by hardware when the counter overflows. it is cleared by software. |
0 |
UIF |
R/W1C/ES |
0x0 |
Update interrupt flag |
REG_TIM_EGR
Name: TIM event generation register
Size: 32
Address offset: 010h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0G |
WA0 |
0x0 |
Capture/Compare 0 generation. This bit is set by software and is automatically cleared by hardware. A Capture/Compare event is generated on channel 0: the current value of the counter is captured in TIM_CCR0 register. The CC0IF flag is set, the corresponding interrupt or request is sent if enabled. |
0 |
UG |
WA0 |
0x0 |
Update generation. Re-initialize the counter and generate an update of registers. Note that the prescaler counter is cleared too.(anyway the prescaler ratio is not affected) |
REG_TIM_CNT
Name: TIM counter
Size: 32
Address offset: 014h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
CNT |
R |
0x0 |
Counter value |
REG_TIM_PSC
Name: TIM prescaler register
Size: 32
Address offset: 018h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
PSC |
R/W |
0x0 |
Prescaler value. psc contains the value to be loaded in the actual prescaler register at each uev(including when the counter is cleared through ug bit of tim_egr register). |
REG_TIM_ARR
Name: TIM auto-reload register
Size: 32
Address offset: 01Ch
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
ARR |
R/W |
0xFFFF |
The value to be loaded in the actual auto-reload register. it can be preloaded by setting arpe bit in tim_cr. |
REG_TIM_CCR0
Name: TIM Capture register
Size: 32
Address offset: 024h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:29 |
RSVD |
- |
Reserved |
|
28 |
CC0PM |
R/W |
0x0 |
CC0 pulse mode
|
27 |
RSVD |
- |
Reserved |
|
26 |
CC0P |
R/W |
0x0 |
CC0 channel configured as output:
CC0 channel configured as input:
|
25 |
RSVD |
- |
Reserved |
|
24 |
CC0E |
R/W |
0x0 |
Enable cc0 |
23:16 |
RSVD |
- |
Reserved |
|
15:0 |
CCR0 |
R/W/ES |
0x0 |
Capture/compare 0 value Cc0 channel configured as pulse mode 0: the pulse width of trgi Cc0 channel configured as pulse mode 1: the pulse number of trgi when the counter counts from 0 to arr |
Base Address: 0x41000800
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
varies |
User can configure and observe the counter operation |
|
004h |
varies |
Registers about the update operation |
|
008h |
varies |
Interrupt enable |
|
00Ch |
varies |
Registers about timer status |
|
010h |
varies |
Update generation user defined |
|
014h |
varies |
Timer count |
|
018h |
varies |
Prescaler value |
|
01Ch |
varies |
Auto-reload value |
|
024h |
varies |
Input capture configuration and the data of capture |
|
028h |
varies |
||
02Ch |
R/W |
Dummy register |
REG_TIM_EN
Name: TIM enable register
Size: 32
Address offset: 000h
Read/write access: varies
User can configure and observe the counter operation
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:17 |
RSVD |
- |
Reserved |
|
16 |
CNT_EN |
R |
0x0 |
Counter working status
|
15:9 |
RSVD |
- |
Reserved |
|
8 |
CEN |
R |
0x0 |
Counter run status
|
7:2 |
RSVD |
- |
Reserved |
|
1 |
CNT_STOP |
WA0 |
0x0 |
Disable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 0, it means that the counter has been disabled internally. |
0 |
CNT_START |
WA0 |
0x0 |
Enable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 1, it means that the counter has been enabled internally. |
REG_TIM_CR
Name: TIM control register
Size: 32
Address offset: 004h
Read/write access: varies
Registers about the update operation
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:5 |
RSVD |
- |
Reserved |
|
4 |
ARPE |
R/W |
0x0 |
Enable auto-reload preloading
|
3 |
RSVD |
- |
Reserved |
|
2 |
URS |
R/W |
0x0 |
Update request source
|
1 |
UDIS |
R/W |
0x0 |
Disable UEV. Shadow registers keep their values. Otherwise, buffered registers are then loaded with their preload values when UEV happen. |
0 |
RSVD |
- |
Reserved |
REG_TIM_DIER
Name: TIM interupt enable register
Size: 32
Address offset: 008h
Read/write access: varies
Interrupt enable
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0IE |
R/W |
0x0 |
Enable Capture/Compare 0 interrupt |
0 |
UIE |
R/W |
0x0 |
Enable update interrupt |
REG_TIM_SR
Name: TIM status register
Size: 32
Address offset: 00Ch
Read/write access: varies
Registers about timer status
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31 |
UG_DONE |
R |
0x1 |
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 |
- |
Reserved |
|
1 |
CC0IF |
RW1C |
0x0 |
Capture/Compare 0 interrupt flag CC0 channel configured as pulse mode 0: This bit is set when TRGI is transferred to inactive level from active level. CC0 channel configured as pulse mode 1: This bit is set by hardware when the counter overflows. It is cleared by software. |
0 |
UIF |
RW1C |
0x0 |
Update interrupt flag |
REG_TIM_EGR
Name: TIM event generation register
Size: 32
Address offset: 010h
Read/write access: varies
Update generation user defined
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0G |
WA0 |
0x0 |
Capture/Compare 0 generation. This bit is set by software and is automatically cleared by hardware. A Capture/Compare event is generated on channel 0: the current value of the counter is captured in TIM_CCR0 register. The CC0IF flag is set, the corresponding interrupt or request is sent if enabled. |
0 |
UG |
WA0 |
0x0 |
Update generation. Re-initialize the counter and generate an update of registers. Note that the prescaler counter is cleared too.(anyway the prescaler ratio is not affected) |
REG_TIM_CNT
Name: TIM counter
Size: 32
Address offset: 014h
Read/write access: varies
Timer count
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
CNT |
R |
0x0 |
Counter value |
REG_TIM_PSC
Name: TIM prescaler register
Size: 32
Address offset: 018h
Read/write access: varies
Prescaler value
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
PSC |
R/W |
0x0 |
Prescaler value. PSC contains the value to be loaded in the actual prescaler register at each UEV(including when the counter is cleared through UG bit of TIM_EGR register). |
REG_TIM_ARR
Name: TIM auto-reload register
Size: 32
Address offset: 01Ch
Read/write access: varies
Auto-reload value
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
ARR |
R/W |
0xFFFF |
The value to be loaded in the actual auto-reload register. It can be preloaded by setting ARPE bit in TIM_CR. |
REG_TIM_CCR0
Name: TIM Capture register
Size: 32
Address offset: 024h
Read/write access: varies
Input capture configuration and the data of capture
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:29 |
RSVD |
- |
Reserved |
|
28 |
CC0PM |
R/W |
0x0 |
CC0 pulse mode
|
27 |
RSVD |
- |
Reserved |
|
26 |
CC0P |
R/W |
0x0 |
CC0 channel configured as output:
CC0 channel configured as input:
|
25 |
RSVD |
- |
Reserved |
|
24 |
CC0E |
R/W |
0x0 |
Enable CC0 |
23:16 |
RSVD |
- |
Reserved |
|
15:0 |
CCR0 |
R/W/ES |
0x0 |
Capture/Compare 0 value CC0 channel configured as pulse mode 0: the pulse width of TRGI CC0 channel configured as pulse mode 1: the pulse number of TRGI when the counter counts from 0 to ARR |
REG_TIM_PULSE_DBC
Name: Timer Pulse dbc Register
Size: 32
Address offset: 028h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:1 |
R_DBC_CYC |
R/W |
0x0 |
Dbc cycle |
0 |
R_DBC_FEN |
R/W |
0x0 |
Enable debounce for pluse
|
REG_TIM_PULSE_DUMMY
Name: Timer Pulse Dummy Register
Size: 32
Address offset: 02Ch
Read/write access: R/W
Dummy register
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:0 |
DUMMY |
R/W |
ffffh |
Dummy register |
Base Address: 0x401C7400
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
varies |
User can configure and observe the counter operation |
|
004h |
varies |
Registers about the update operation |
|
008h |
varies |
Interrupt enable |
|
00Ch |
varies |
Registers about timer status |
|
010h |
varies |
Update generation user defined |
|
014h |
varies |
Timer count |
|
018h |
varies |
Prescaler value |
|
01Ch |
varies |
Auto-reload value |
|
024h |
varies |
Input capture configuration and the data of capture |
|
028h |
varies |
||
02Ch |
R/W |
Dummy register |
REG_TIM_EN
Name: TIM enable register
Size: 32
Address offset: 000h
Read/write access: varies
User can configure and observe the counter operation
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:17 |
RSVD |
- |
Reserved |
|
16 |
CNT_EN |
R |
0x0 |
Counter working status
|
15:9 |
RSVD |
- |
Reserved |
|
8 |
CEN |
R |
0x0 |
Counter run status
|
7:2 |
RSVD |
- |
Reserved |
|
1 |
CNT_STOP |
WA0 |
0x0 |
Disable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 0, it means that the counter has been disabled internally. |
0 |
CNT_START |
WA0 |
0x0 |
Enable the counter. Poll CNT_RUN to see the counter status. If CNT_RUN is 1, it means that the counter has been enabled internally. |
REG_TIM_CR
Name: TIM control register
Size: 32
Address offset: 004h
Read/write access: varies
Registers about the update operation
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:5 |
RSVD |
- |
Reserved |
|
4 |
ARPE |
R/W |
0x0 |
Enable auto-reload preloading
|
3 |
RSVD |
- |
Reserved |
|
2 |
URS |
R/W |
0x0 |
Update request source
|
1 |
UDIS |
R/W |
0x0 |
Disable UEV. Shadow registers keep their values. Otherwise, buffered registers are then loaded with their preload values when UEV happen. |
0 |
RSVD |
- |
Reserved |
REG_TIM_DIER
Name: TIM interupt enable register
Size: 32
Address offset: 008h
Read/write access: varies
Interrupt enable
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:10 |
RSVD |
- |
Reserved |
|
9 |
CC0DE |
R/W |
0x0 |
Rsvd |
8 |
UDE |
R/W |
0x0 |
Rsvd |
7:2 |
RSVD |
- |
Reserved |
|
1 |
CC0IE |
R/W |
0x0 |
Enable Capture/Compare 0 interrupt |
0 |
UIE |
R/W |
0x0 |
Enable update interrupt |
REG_TIM_SR
Name: TIM status register
Size: 32
Address offset: 00Ch
Read/write access: varies
Registers about timer status
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31 |
UG_DONE |
R |
0x1 |
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 |
- |
Reserved |
|
1 |
CC0IF |
RW1C |
0x0 |
Capture/Compare 0 interrupt flag CC0 channel configured as pulse mode 0: This bit is set when TRGI is transferred to inactive level from active level. CC0 channel configured as pulse mode 1: This bit is set by hardware when the counter overflows. It is cleared by software. |
0 |
UIF |
RW1C |
0x0 |
Update interrupt flag |
REG_TIM_EGR
Name: TIM event generation register
Size: 32
Address offset: 010h
Read/write access: varies
Update generation user defined
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:2 |
RSVD |
- |
Reserved |
|
1 |
CC0G |
WA0 |
0x0 |
Capture/Compare 0 generation. This bit is set by software and is automatically cleared by hardware. A Capture/Compare event is generated on channel 0: the current value of the counter is captured in TIM_CCR0 register. The CC0IF flag is set, the corresponding interrupt or request is sent if enabled. |
0 |
UG |
WA0 |
0x0 |
Update generation. Re-initialize the counter and generate an update of registers. Note that the prescaler counter is cleared too.(anyway the prescaler ratio is not affected) |
REG_TIM_CNT
Name: TIM counter
Size: 32
Address offset: 014h
Read/write access: varies
Timer count
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
CNT |
R |
0x0 |
Counter value |
REG_TIM_PSC
Name: TIM prescaler register
Size: 32
Address offset: 018h
Read/write access: varies
Prescaler value
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
PSC |
R/W |
0x0 |
Prescaler value. PSC contains the value to be loaded in the actual prescaler register at each UEV(including when the counter is cleared through UG bit of TIM_EGR register). |
REG_TIM_ARR
Name: TIM auto-reload register
Size: 32
Address offset: 01Ch
Read/write access: varies
Auto-reload value
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:0 |
ARR |
R/W |
0xFFFF |
The value to be loaded in the actual auto-reload register. It can be preloaded by setting ARPE bit in TIM_CR. |
REG_TIM_CCR0
Name: TIM Capture register
Size: 32
Address offset: 024h
Read/write access: varies
Input capture configuration and the data of capture
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:29 |
RSVD |
- |
Reserved |
|
28 |
CC0PM |
R/W |
0x0 |
CC0 pulse mode
|
27 |
RSVD |
- |
Reserved |
|
26 |
CC0P |
R/W |
0x0 |
CC0 channel configured as output:
CC0 channel configured as input:
|
25 |
RSVD |
- |
Reserved |
|
24 |
CC0E |
R/W |
0x0 |
Enable CC0 |
23:16 |
RSVD |
- |
Reserved |
|
15:0 |
CCR0 |
R |
0x0 |
Capture/Compare 0 value CC0 channel configured as pulse mode 0: the pulse width of TRGI CC0 channel configured as pulse mode 1: the pulse number of TRGI when the counter counts from 0 to ARR |
REG_TIM_PULSE_DBC
Name: Timer Pulse dbc Register
Size: 32
Address offset: 028h
Read/write access: varies
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
- |
Reserved |
|
15:1 |
R_DBC_CYC |
R/W |
0x0 |
Dbc cycle |
0 |
R_DBC_FEN |
R/W |
0x0 |
Enable debounce for pluse
|
REG_TIM_PULSE_DUMMY
Name: Timer Pulse Dummy Register
Size: 32
Address offset: 02Ch
Read/write access: R/W
Dummy register
Bit |
Symbol |
Access |
INI |
Description |
|---|---|---|---|---|
31:0 |
DUMMY |
R/W |
ffffh |
Dummy register |