Debug Timer
Debug timer is a common timestamp for all debug messages originating from all on-die processors and processor execution domains (application, kernel, and firmware). It also includes a lock-free increment counter.
Features
Simple
{{IC_PARAM_DEBUG_TIMER_WIDTH}}wrap timerA lock-free counter
Simple
{{IC_PARAM_DEBUG_TIMER_WIDTH}}wrap timerA lock-free counter
Simple
{{IC_PARAM_DEBUG_TIMER_WIDTH}}wrap timerA lock-free counter
Simple
{{IC_PARAM_DEBUG_TIMER_WIDTH}}wrap timerA lock-free counter
Simple
{{IC_PARAM_DEBUG_TIMER_WIDTH}}wrap timerA lock-free counter
Functional Description
The debug timer has two types of clock input: XTAL and internal 32K.
When selecting XTAL with an internal divider, XTAL can generate a fixed 1us time interval between each time increments.
When selecting 32K clock, the counter increases 31us every 30.5us.
The counter can be enabled and disabled, by default it is enabled. The counter wraps around to zero and continues to count once it reaches {{IC_PARAM_DEBUG_TIMER_MAX_VALUE}}. A write to timestamp will set the current value of the timestamp, however, it must continue to increment at the base of the new setting value if the writing happens when the counter is active.
The counter can be enabled and disabled, by default it is enabled. The counter wraps around to zero and continues to count once it reaches {{IC_PARAM_DEBUG_TIMER_MAX_VALUE}}. A write to timestamp will set the current value of the timestamp, however, it must continue to increment at the base of the new setting value if the writing happens when the counter is active.
The counter can be enabled and disabled, by default it is enabled. The counter wraps around to zero and continues to count once it reaches {{IC_PARAM_DEBUG_TIMER_MAX_VALUE}}. A write to timestamp will set the current value of the timestamp, however, it must continue to increment at the base of the new setting value if the writing happens when the counter is active.
The counter can be enabled and disabled, by default it is enabled. The counter wraps around to zero and continues to count once it reaches {{IC_PARAM_DEBUG_TIMER_MAX_VALUE}}. A write to timestamp will set the current value of the timestamp, however, it must continue to increment at the base of the new setting value if the writing happens when the counter is active.
The counter can be enabled and disabled, by default it is enabled. The counter wraps around to zero and continues to count once it reaches {{IC_PARAM_DEBUG_TIMER_MAX_VALUE}}. A write to timestamp will set the current value of the timestamp, however, it must continue to increment at the base of the new setting value if the writing happens when the counter is active.
The XTAL clock may be gated in sleep mode. If you select XTAL as the clock source in sleep mode, the debug timer will stop counting, and all the registers will be maintained. The counter will resume the increment immediately after XTAL resumes. You can select 32K as the clock source in sleep mode; however, the counter itself needs 220us to do switch clock before continuing counting. In this period, writing to this IP is not allowed. All the registers will be reset to the initial values after wakeup from deepsleep mode.
The lock-free counter is a read trigger increase counter, can be used to debug timing issues in multicore SoC. Arbitration is implemented at the bus level. The counter has two read windows: read will trigger the counter increases one if reading from DBGT_ATOM_INC, and will not increase if reading from DBGT_ATOM.
The timestamp and atom should be reset to zero on the rising edge of the ENABLE bit (DBGT_CTRL [0]).
Registers
The following table lists the memory map of the debug timer registers.
Base Address: 0x41015000
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
R/W |
This register contains the configuration of debug timer’s clock and enable signal. |
|
004h |
R/W |
||
008h |
R |
Atom count adds 1. |
|
00Ch |
R/W |
||
010h |
R/W |
This register is user-defined. |
|
014h |
R/W |
REG_DBGT_CTRL
Name : Debug Timer control register
Size : 32
Address offset : 000h
Read/write access : R/W
This register contains the configuration of debug timer’s clock and enable signal.
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:1 |
RSVD |
R |
- |
Reserved |
0 |
ENABLE |
R/W |
1h |
Debug timer enable.
|
REG_DBGT_CRV
Name : Debug Timer count register
Size : 32
Address offset : 004h
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_CRV |
R/W |
0h |
Continue to count from 0 once it’s reached 32’hFFFFFFFF. |
REG_DBGT_ATOM_INC
Name : Debug Timer atom read increase register
Size : 32
Address offset : 008h
Read/write access : R
Atom count adds 1.
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_ATOM_INC |
R |
0h |
Each read will increase 1 and return to the increased value to bus. |
REG_DBGT_ATOM
Name : Debug Timer atom register
Size : 32
Address offset : 00Ch
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_ATOM |
R/W |
0h |
Return the last increased value of atom counter. |
REG_DBGT_SCRATCH
Name : Debug Timer scratch register
Size : 32
Address offset : 010h
Read/write access : R/W
This register is user-defined.
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_SCRATCH |
R/W |
0h |
Reserved |
REG_DBGTIM_DUMMY
Name : Debug Timer Dummy Register
Size : 32
Address offset : 014h
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DUMMY |
R/W |
ffffh |
Dummy register |
Base Address: 0x4011E000
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
R/W |
This register contains the configuration of debugtimer’s clock and enable signal. |
|
004h |
R/W |
Timestamp count |
|
008h |
R |
Atom count adds 1. |
|
00Ch |
R/W |
Atom count value |
|
010h |
R/W |
User-defined register |
|
014h |
R/W |
REG_DBGT_CTRL
Name : debugtimer control register
Size : 32
Address offset : 000h
Read/write access : R/W
This register contains the configuration of debugtimer’s clock and enable signal.
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
R |
- |
Reserved |
15:4 |
DIV |
R/W |
28h |
The default value can used to divide 40M XTAL to 1M |
3:1 |
CLKSEL |
R/W |
0h |
Clock source selection
|
0 |
ENABLE |
R/W |
1h |
Debug timer enable
|
REG_DBGT_CRV
Name : debugtimer count register
Size : 32
Address offset : 004h
Read/write access : R/W
Timestamp count
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_CRV |
R/W |
0h |
Continue to count from 0 once it’s reached 32’hFFFFFFFF |
REG_DBGT_ATOM_INC
Name : debugtimer atom read increase register
Size : 32
Address offset : 008h
Read/write access : R
Atom count adds 1.
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_ATOM_INC |
R |
0h |
Each read will increase 1 and return to the increased value to bus. |
REG_DBGT_ATOM
Name : debugtimer atom register
Size : 32
Address offset : 00Ch
Read/write access : R/W
Atom count value
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_ATOM |
R/W |
0h |
Return the last increased value of atom counter |
REG_DBGT_SCRATCH
Name : debugtimer scratch register
Size : 32
Address offset : 010h
Read/write access : R/W
User-defined register
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_SCRATCH |
R/W |
0h |
Reserved for users |
REG_DBGTIM_DUMMY
Name : Debug Timer Dummy Register
Size : 32
Address offset : 014h
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DUMMY |
R/W |
ffffh |
Dummy register |
Base Address: 0x42009000
Name |
Address offset |
Access |
Description |
|---|---|---|---|
000h |
R/W |
||
004h |
R/W |
||
008h |
R |
||
00Ch |
R/W |
||
010h |
R/W |
REG_DBGT_CTRL
Name : debugtimer control register
Size : 32
Address offset : 000h
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:16 |
RSVD |
R |
- |
Reserved |
15:4 |
DIV |
R/W |
28h |
The default value can used to divide 40M Xtal to 1M |
3:1 |
CLKSEL |
R/W |
0h |
Clock source select
|
0 |
ENABLE |
R/W |
1h |
Debug timer enable.
|
REG_DBGT_CRV
Name : debugtimer count register
Size : 32
Address offset : 004h
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_CRV |
R/W |
0h |
Continuing to count from 0 once it’s reached 32’hFFFFFFFF |
REG_DBGT_ATOM_INC
Name : debugtimer atom read increase
Size : 32
Address offset : 008h
Read/write access : R
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_ATOM_INC |
R |
0h |
Each read will increase 1 and return to the increased value to bus. |
REG_DBGT_ATOM
Name : debugtimer atom
Size : 32
Address offset : 00Ch
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_ATOM |
R/W |
0h |
Return the last increased value of atom counter |
REG_DBGT_SCRATCH
Name : debugtimer scratch
Size : 32
Address offset : 010h
Read/write access : R/W
Bit |
Symbol |
Access |
Reset |
Description |
|---|---|---|---|---|
31:0 |
DBGT_SCRATCH |
R/W |
0h |
Reserved for user use |