\n

DWT

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x1000 byte (0x0)
mem_usage : registers
protection : not protected

Registers

CTRL

SLEEPCNT

LSUCNT

FOLDCNT

PCSR

COMP0

MASK0

FUNCTION0

COMP1

MASK1

FUNCTION1

CYCCNT

COMP2

MASK2

FUNCTION2

COMP3

MASK3

FUNCTION3

CPICNT

EXCCNT


CTRL

DWT Control Register
address_offset : 0x0 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CTRL CTRL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CYCCNTENA POSTPRESET POSTCNT CYCTAP SYNCTAP PCSAMPLEENA EXCTRCENA CPIEVTENA EXCEVTENA SLEEPEVTENA LSUEVTENA FOLDEVTENA CYCEVTENA NOPRFCNT NOCYCCNT

CYCCNTENA : Enable the CYCCNT counter. If not enabled, the counter does not count and no event is generated for PS sampling or CYCCNTENA. In normal use, the debugger must initialize the CYCCNT counter to 0.
bits : 0 - 0 (1 bit)
access : read-write

POSTPRESET : Reload value for POSTCNT, bits [8:5], post-scalar counter. If this value is 0, events are triggered on each tap change (a power of 2). If this field has a non-0 value, this forms a count-down value, to be reloaded into POSTCNT each time it reaches 0. For example, a value 1 in this register means an event is formed every other tap change.
bits : 1 - 4 (4 bit)
access : read-write

POSTCNT : Post-scalar counter for CYCTAP. When the selected tapped bit changes from 0 to 1 or 1 to 0, the post scalar counter is down-counted when not 0. If 0, it triggers an event for PCSAMPLENA or CYCEVTENA use. It also reloads with the value from POSTPRESET (bits [4:1]).
bits : 5 - 8 (4 bit)
access : read-write

CYCTAP : Selects a tap on the DWT_CYCCNT register. These are spaced at bits [6] and [10]. When the selected bit in the CYCCNT register changes from 0 to 1 or 1 to 0, it emits into the POSTCNT, bits [8:5], post-scalar counter. That counter then counts down. On a bit change when post-scalar is 0, it triggers an event for PC sampling or CYCEVTCNT.
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

selects bit [6] to tap

1 : en_0b1

selects bit [10] to tap.

End of enumeration elements list.

SYNCTAP : Feeds a synchronization pulse to the ITM SYNCENA control. The value selected here picks the rate (approximately 1/second or less) by selecting a tap on the DWT_CYCCNT register. To use synchronization (heartbeat and hot-connect synchronization), CYCCNTENA must be set to 1, SYNCTAP must be set to one of its values, and SYNCENA must be set to 1.
bits : 10 - 11 (2 bit)
access : read-write

Enumeration:

0 : en_0b00

Disabled. No synch counting.

1 : en_0b01

Tap at CYCCNT bit 24.

2 : en_0b10

Tap at CYCCNT bit 26.

3 : en_0b11

Tap at CYCCNT bit 28.

End of enumeration elements list.

PCSAMPLEENA : Enables PC Sampling event. A PC sample event is emitted when the POSTCNT counter triggers it. See CYCTAP, bit [9], and POSTPRESET, bits [4:1], for details. Enabling this bit overrides CYCEVTENA (bit [20]). Reset clears the PCSAMPLENA bit.
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

PC Sampling event disabled.

1 : en_0b1

Sampling event enabled.

End of enumeration elements list.

EXCTRCENA : Enables Interrupt event tracing. Reset clears the EXCEVTENA bit.
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

interrupt event trace disabled.

1 : en_0b1

interrupt event trace enabled.

End of enumeration elements list.

CPIEVTENA : Enables CPI count event. Emits an event when DWT_CPICNT overflows (every 256 cycles of multi-cycle instructions). Reset clears the CPIEVTENA bit.
bits : 17 - 17 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

CPI counter events disabled.

1 : en_0b1

CPI counter events enabled.

End of enumeration elements list.

EXCEVTENA : Enables Interrupt overhead event. Emits an event when DWT_EXCCNT overflows (every 256 cycles of interrupt overhead). Reset clears the EXCEVTENA bit.
bits : 18 - 18 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

Interrupt overhead event disabled.

1 : en_0b1

Interrupt overhead event enabled.

End of enumeration elements list.

SLEEPEVTENA : Enables Sleep count event. Emits an event when DWT_SLEEPCNT overflows (every 256 cycles that the processor is sleeping). Reset clears the SLEEPEVTENA bit.
bits : 19 - 19 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

Sleep count events disabled.

1 : en_0b1

Sleep count events enabled.

End of enumeration elements list.

LSUEVTENA : Enables LSU count event. Emits an event when DWT_LSUCNT overflows (every 256 cycles of LSU operation). LSU counts include all LSU costs after the initial cycle for the instruction. Reset clears the LSUEVTENA bit.
bits : 20 - 20 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

LSU count events disabled.

1 : en_0b1

LSU count events enabled.

End of enumeration elements list.

FOLDEVTENA : Enables Folded instruction count event. Emits an event when DWT_FOLDCNT overflows (every 256 cycles of folded instructions). A folded instruction is one that does not incur even one cycle to execute. For example, an IT instruction is folded away and so does not use up one cycle. Reset clears the FOLDEVTENA bit.
bits : 21 - 21 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

Folded instruction count events disabled.

1 : en_0b1

Folded instruction count events enabled.

End of enumeration elements list.

CYCEVTENA : Enables Cycle count event. Emits an event when the POSTCNT counter triggers it. See CYCTAP (bit [9]) and POSTPRESET, bits [4:1], for details. This event is only emitted if PCSAMPLENA, bit [12], is disabled. PCSAMPLENA overrides the setting of this bit. Reset clears the CYCEVTENA bit.
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

0 : en_0b0

Cycle count events disabled.

1 : en_0b1

Cycle count events enabled.

End of enumeration elements list.

NOPRFCNT : When set, DWT_FOLDCNT, DWT_LSUCNT, DWT_SLEEPCNT, DWT_EXCCNT, and DWT_CPICNT are not supported.
bits : 24 - 24 (1 bit)
access : read-write

NOCYCCNT : When set, DWT_CYCCNT is not supported.
bits : 25 - 25 (1 bit)
access : read-write


SLEEPCNT

DWT Sleep Count Register
address_offset : 0x10 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

SLEEPCNT SLEEPCNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SLEEPCNT

SLEEPCNT : Sleep counter. Counts the number of cycles during which the processor is sleeping. An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when enabled. Note that SLEEPCNT is clocked using FCLK. It is possible that the frequency of FCLK might be reduced while the processor is sleeping to minimize power consumption. This means that sleep duration must be calculated with the frequency of FCLK during sleep.
bits : 0 - 7 (8 bit)
access : read-write


LSUCNT

DWT LSU Count Register
address_offset : 0x14 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

LSUCNT LSUCNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 LSUCNT

LSUCNT : LSU counter. This counts the total number of cycles that the processor is processing an LSU operation. The initial execution cost of the instruction is not counted. For example, an LDR that takes two cycles to complete increments this counter one cycle. Equivalently, an LDR that stalls for two cycles (and so takes four cycles), increments this counter three times. An event is emitted on counter overflow (every 256 cycles). Clears to 0 on enabling.
bits : 0 - 7 (8 bit)
access : read-write


FOLDCNT

DWT Fold Count Register
address_offset : 0x18 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

FOLDCNT FOLDCNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FOLDCNT

FOLDCNT : This counts the total number folded instructions. This counter initializes to 0 when enabled.
bits : 0 - 7 (8 bit)
access : read-write


PCSR

DWT Program Counter Sample Register
address_offset : 0x1C Bytes (0x0)
size : 32 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

PCSR PCSR read-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 EIASAMPLE

EIASAMPLE : Execution instruction address sample, or 0xFFFFFFFF if the core is halted.
bits : 0 - 31 (32 bit)
access : read-only


COMP0

DWT Comparator Register 0
address_offset : 0x20 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

COMP0 COMP0 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 COMP

COMP : Data value to compare against PC and the data address as given by DWT_FUNCTION0. DWT_COMP0 can also compare against the value of the PC Sampler Counter (DWT_CYCCNT).
bits : 0 - 31 (32 bit)
access : read-write


MASK0

DWT Mask Register 0
address_offset : 0x24 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

MASK0 MASK0 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 MASK

MASK : Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
bits : 0 - 3 (4 bit)
access : read-write


FUNCTION0

DWT Function Register 0
address_offset : 0x28 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

FUNCTION0 FUNCTION0 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FUNCTION EMITRANGE DATAVMATCH LNK1ENA DATAVSIZE DATAVADDR0 DATAVADDR1 MATCHED

FUNCTION : Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
bits : 0 - 3 (4 bit)
access : read-write

Enumeration:

0 : en_0b0000

Disabled

1 : en_0b0001

EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM

2 : en_0b0010

EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.

3 : en_0b0011

EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.

4 : en_0b0100

Watchpoint on PC match.

5 : en_0b0101

Watchpoint on read.

6 : en_0b0110

Watchpoint on write.

7 : en_0b0111

Watchpoint on read or write.

8 : en_0b1000

ETM trigger on PC match

9 : en_0b1001

ETM trigger on read

10 : en_0b1010

ETM trigger on write

11 : en_0b1011

ETM trigger on read or write

12 : en_0b1100

EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers

13 : en_0b1101

EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers

14 : en_0b1110

EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers

15 : en_0b1111

EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers

End of enumeration elements list.

EMITRANGE : Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
bits : 5 - 5 (1 bit)
access : read-write

DATAVMATCH : This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
bits : 8 - 8 (1 bit)
access : read-write

LNK1ENA :
bits : 9 - 9 (1 bit)
access : read-only

Enumeration:

0 : en_0b0

DATAVADDR1 not supported

1 : en_0b1

DATAVADDR1 supported (enabled).

End of enumeration elements list.

DATAVSIZE : Defines the size of the data in the COMP register that is to be matched:
bits : 10 - 11 (2 bit)
access : read-write

Enumeration:

0 : en_0b00

byte

1 : en_0b01

halfword

2 : en_0b10

word

3 : en_0b11

Unpredictable.

End of enumeration elements list.

DATAVADDR0 : Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
bits : 12 - 15 (4 bit)
access : read-write

DATAVADDR1 : Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
bits : 16 - 19 (4 bit)
access : read-write

MATCHED : This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
bits : 24 - 24 (1 bit)
access : read-write


COMP1

DWT Comparator Register 1
address_offset : 0x30 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

COMP1 COMP1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 COMP

COMP : Data value to compare against PC and the data address as given by DWT_FUNCTION1.
bits : 0 - 31 (32 bit)
access : read-write


MASK1

DWT Mask Register 1
address_offset : 0x34 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

MASK1 MASK1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 MASK

MASK : Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
bits : 0 - 3 (4 bit)
access : read-write


FUNCTION1

DWT Function Register 1
address_offset : 0x38 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

FUNCTION1 FUNCTION1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FUNCTION EMITRANGE CYCMATCH DATAVMATCH LNK1ENA DATAVSIZE DATAVADDR0 DATAVADDR1 MATCHED

FUNCTION : Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: FUNCTION is overridden for comparators given by DATAVADDR0 and DATAVADDR1 in DWT_FUNCTION1if DATAVMATCH is also set in DWT_FUNCTION1. The comparators given by DATAVADDR0 and DATAVADDR1 can then only perform address comparator matches for comparator 1 data matches. Note 4: If the data matching functionality is not included during implementation it is not possible to set DATAVADDR0, DATAVADDR1, or DATAVMATCH in DWT_FUNCTION1. This means that the data matching functionality is not available in the implementation. Test the availability of data matching by writing and reading the DATAVMATCH bit in DWT_FUNCTION1. If it is not settable then data matching is unavailable. Note 5: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
bits : 0 - 3 (4 bit)
access : read-write

Enumeration:

0 : en_0b0000

Disabled

1 : en_0b0001

EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM

2 : en_0b0010

EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.

3 : en_0b0011

EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.

4 : en_0b0100

Watchpoint on PC match.

5 : en_0b0101

Watchpoint on read.

6 : en_0b0110

Watchpoint on write.

7 : en_0b0111

Watchpoint on read or write.

8 : en_0b1000

ETM trigger on PC match

9 : en_0b1001

ETM trigger on read

10 : en_0b1010

ETM trigger on write

11 : en_0b1011

ETM trigger on read or write

12 : en_0b1100

EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers

13 : en_0b1101

EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers

14 : en_0b1110

EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers

15 : en_0b1111

EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers

End of enumeration elements list.

EMITRANGE : Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
bits : 5 - 5 (1 bit)
access : read-write

CYCMATCH : Only available in comparator 0. When set, this comparator compares against the clock cycle counter.
bits : 7 - 7 (1 bit)
access : read-write

DATAVMATCH : This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
bits : 8 - 8 (1 bit)
access : read-write

LNK1ENA :
bits : 9 - 9 (1 bit)
access : read-only

Enumeration:

0 : en_0b0

DATAVADDR1 not supported

1 : en_0b1

DATAVADDR1 supported (enabled).

End of enumeration elements list.

DATAVSIZE : Defines the size of the data in the COMP register that is to be matched:
bits : 10 - 11 (2 bit)
access : read-write

Enumeration:

0 : en_0b00

byte

1 : en_0b01

halfword

2 : en_0b10

word

3 : en_0b11

Unpredictable.

End of enumeration elements list.

DATAVADDR0 : Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
bits : 12 - 15 (4 bit)
access : read-write

DATAVADDR1 : Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
bits : 16 - 19 (4 bit)
access : read-write

MATCHED : This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
bits : 24 - 24 (1 bit)
access : read-write


CYCCNT

DWT Current PC Sampler Cycle Count Register
address_offset : 0x4 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CYCCNT CYCCNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CYCCNT

CYCCNT : Current PC Sampler Cycle Counter count value. When enabled, this counter counts the number of core cycles, except when the core is halted. CYCCNT is a free running counter, counting upwards. It wraps around to 0 on overflow. The debugger must initialize this to 0 when first enabling.
bits : 0 - 31 (32 bit)
access : read-write


COMP2

DWT Comparator Register 2
address_offset : 0x40 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

COMP2 COMP2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 COMP

COMP : Data value to compare against PC and the data address as given by DWT_FUNCTION2.
bits : 0 - 31 (32 bit)
access : read-write


MASK2

DWT Mask Register 2
address_offset : 0x44 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

MASK2 MASK2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 MASK

MASK : Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
bits : 0 - 3 (4 bit)
access : read-write


FUNCTION2

DWT Function Register 2
address_offset : 0x48 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

FUNCTION2 FUNCTION2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FUNCTION EMITRANGE DATAVMATCH LNK1ENA DATAVSIZE DATAVADDR0 DATAVADDR1 MATCHED

FUNCTION : Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
bits : 0 - 3 (4 bit)
access : read-write

Enumeration:

0 : en_0b0000

Disabled

1 : en_0b0001

EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM

2 : en_0b0010

EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.

3 : en_0b0011

EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.

4 : en_0b0100

Watchpoint on PC match.

5 : en_0b0101

Watchpoint on read.

6 : en_0b0110

Watchpoint on write.

7 : en_0b0111

Watchpoint on read or write.

8 : en_0b1000

ETM trigger on PC match

9 : en_0b1001

ETM trigger on read

10 : en_0b1010

ETM trigger on write

11 : en_0b1011

ETM trigger on read or write

12 : en_0b1100

EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers

13 : en_0b1101

EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers

14 : en_0b1110

EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers

15 : en_0b1111

EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers

End of enumeration elements list.

EMITRANGE : Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
bits : 5 - 5 (1 bit)
access : read-write

DATAVMATCH : This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
bits : 8 - 8 (1 bit)
access : read-write

LNK1ENA :
bits : 9 - 9 (1 bit)
access : read-only

Enumeration:

0 : en_0b0

DATAVADDR1 not supported

1 : en_0b1

DATAVADDR1 supported (enabled).

End of enumeration elements list.

DATAVSIZE : Defines the size of the data in the COMP register that is to be matched:
bits : 10 - 11 (2 bit)
access : read-write

Enumeration:

0 : en_0b00

byte

1 : en_0b01

halfword

2 : en_0b10

word

3 : en_0b11

Unpredictable.

End of enumeration elements list.

DATAVADDR0 : Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
bits : 12 - 15 (4 bit)
access : read-write

DATAVADDR1 : Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
bits : 16 - 19 (4 bit)
access : read-write

MATCHED : This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
bits : 24 - 24 (1 bit)
access : read-write


COMP3

DWT Comparator Register 3
address_offset : 0x50 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

COMP3 COMP3 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 COMP

COMP : Data value to compare against PC and the data address as given by DWT_FUNCTION3.
bits : 0 - 31 (32 bit)
access : read-write


MASK3

DWT Mask Register 3
address_offset : 0x54 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

MASK3 MASK3 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 MASK

MASK : Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
bits : 0 - 3 (4 bit)
access : read-write


FUNCTION3

DWT Function Register 3
address_offset : 0x58 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

FUNCTION3 FUNCTION3 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FUNCTION EMITRANGE DATAVMATCH LNK1ENA DATAVSIZE DATAVADDR0 DATAVADDR1 MATCHED

FUNCTION : Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
bits : 0 - 3 (4 bit)
access : read-write

Enumeration:

0 : en_0b0000

Disabled

1 : en_0b0001

EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM

2 : en_0b0010

EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.

3 : en_0b0011

EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.

4 : en_0b0100

Watchpoint on PC match.

5 : en_0b0101

Watchpoint on read.

6 : en_0b0110

Watchpoint on write.

7 : en_0b0111

Watchpoint on read or write.

8 : en_0b1000

ETM trigger on PC match

9 : en_0b1001

ETM trigger on read

10 : en_0b1010

ETM trigger on write

11 : en_0b1011

ETM trigger on read or write

12 : en_0b1100

EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers

13 : en_0b1101

EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers

14 : en_0b1110

EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers

15 : en_0b1111

EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers

End of enumeration elements list.

EMITRANGE : Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
bits : 5 - 5 (1 bit)
access : read-write

DATAVMATCH : This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
bits : 8 - 8 (1 bit)
access : read-write

LNK1ENA :
bits : 9 - 9 (1 bit)
access : read-only

Enumeration:

0 : en_0b0

DATAVADDR1 not supported

1 : en_0b1

DATAVADDR1 supported (enabled).

End of enumeration elements list.

DATAVSIZE : Defines the size of the data in the COMP register that is to be matched:
bits : 10 - 11 (2 bit)
access : read-write

Enumeration:

0 : en_0b00

byte

1 : en_0b01

halfword

2 : en_0b10

word

3 : en_0b11

Unpredictable.

End of enumeration elements list.

DATAVADDR0 : Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
bits : 12 - 15 (4 bit)
access : read-write

DATAVADDR1 : Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
bits : 16 - 19 (4 bit)
access : read-write

MATCHED : This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
bits : 24 - 24 (1 bit)
access : read-write


CPICNT

DWT CPI Count Register
address_offset : 0x8 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CPICNT CPICNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CPICNT

CPICNT : Current CPI counter value. Increments on the additional cycles (the first cycle is not counted) required to execute all instructions except those recorded by DWT_LSUCNT. This counter also increments on all instruction fetch stalls. If CPIEVTENA is set, an event is emitted when the counter overflows. Clears to 0 on enabling.
bits : 0 - 7 (8 bit)
access : read-write


EXCCNT

DWT Exception Overhead Count Register
address_offset : 0xC Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

EXCCNT EXCCNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 EXCCNT

EXCCNT : Current interrupt overhead counter value. Counts the total cycles spent in interrupt processing (for example entry stacking, return unstacking, pre-emption). An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when enabled. Clears to 0 on enabling.
bits : 0 - 7 (8 bit)
access : read-write



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.