SWCU193A April 2023 – August 2024 CC2340R2 , CC2340R5 , CC2340R5-Q1
The debug subsystem mailbox (DSSM) enables a debug probe to pass messages to the target device through the SWD interface, and for the target device to return data to the debug probe.
The DSSM supports the following functions:
32-bit word data buffers are provided for transmit data (debug probe to target device) and receive data (target device to debug probe). These data buffers are implemented as the 32-bit memory-mapped registers DBGSS.TXD and DBGSS.RXD. The DBGSS.TXCTL and DBGSS.RXCTL registers are provided for enabling flow control and indicating status of the mailbox.
DBGSS Register | Description | Debug Probe | Target Device | Actions |
---|---|---|---|---|
TXD | Data buffer | RW | R | DBGSS.TXCTL[0] TXDSTA bit is set on write by the debug probe, and cleared on a read by the target device. DBGSS.RIS[0] TXIFG bit is also set on a write by the debug probe. |
TXCTL | Flow control and status | RW | R | None |
RXD | Data buffer | R | RW | DBGSS.RXCTL[0] RXDSTA bit is set on write by the target device, and cleared on a read by the debug probe. DBGSS.RIS[1] RXIFG bit is also set on a write by the target device |
RXCTL | Flow control and status | R | RW | None |
The DBGSS.TXCTL[0] TRANSMIT bit is set in the TXCTL register when a debug probe writes data to the DBGSS.TXD buffer register. The TRANSMIT flag remains set until the target device reads DBGSS.TXD or a POR occurs. The DBGSS.RXCTL[0] RECEIVE bit is set when the target device writes data to the DBGSS.RXD buffer register. The RECEIVE flag remains set until the debug probe or target device reads the data from DBGSS.RXD.
Software running on the target device cannot write to TXD, and software cannot clear the TRANSMIT flag other than by reading DGBSS.TXD. The DBGSS.TXCTL[7:1] bit field contains flag bits which can be set or cleared by the debug probe to implement a protocol if desired. Only the debug probe can write to the TRANSMIT_FLAGS field in TXCTL.
In a similar way, only the target device software can write to DBGSS.RXD and DBGSS.RXCTL. The debug probe cannot write to RX_DATA and can only clear the DEBUGSS.RXCTL[0] RECEIVE bit by reading DBGSS.RXD. DBGSS.RXCTL[7:1] FLAGS bit field contains flag bits. Software on the target device can set or clear bits in the DBGSS.RXCTL[7:1] FLAGS field to implement a protocol if desired. These flags can be read by the debug probe but can not be modified by the debug probe.
DBGSS.TXDPEEK and DBGSS.RXDPEEK registers can be read by the device to read DBGSS.TXD and DBGSS.RXD registers without affecting the FULL/EMPTY flag.
For a complete listing of commands that are supported by the boot configuration routine during device startup configuration, see Chapter 8.