DCC

From SEGGER Wiki
Revision as of 11:59, 5 September 2019 by Johannes (talk | contribs) (Created page with "Category:Knowledge Base The Debug Communication Channel (DCC) is available on ARM7/ARM8/ARM11 and Cortex-A/Cortex-R processors. It can be used to enable transfer of data...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The Debug Communication Channel (DCC) is available on ARM7/ARM8/ARM11 and Cortex-A/Cortex-R processors. It can be used to enable transfer of data between the target device and the debugger.

The DCC is implemented in coprocessor 14 and contains three registers:

  • A 32-bit read register
  • A 32-bit write register
  • A 32-bit control register (where two bits are used).

The target application can send data to the debugger using the write register. When a word is loaded into the register, the W bit in the control register is set to notify the debug probe / debugger. The debugger reads the write register and clears the W bit to make the write register available again.

The target application can read data from the debugger using the read register. The debugger can write a word to the read register and set the R bit in the control register to notify the target application. When the target application reads the read register, the R bit is cleared again.

The target application can poll the R and W bit of the control register to check whether it can send or receive data. Alternatively changes of the bits can be made available as COMMRX and COMMTX interrupts to enable more efficient interrupt-driven communication.

DCC can be used to transfer any kind of data while the target CPU is running. It is most commonly used for debug printf output or for system information, such as in embOS View.

Although DCC provides a way for the debugger to communicate with the target application without halting it, DCC can add a lot overhead to the target application and affect the runtime behavior. As the DCC registers are only 32-bit wide, only one word can be transferred at a time. For more data to be output, the data needs to be buffered and the status of the W bit needs to be monitored, resulting in memory use and computing overhead.

A communication protocol is not defined. Target application and debugger need to use the same implementation of a protocol to communicate according to what DCC should be used for. In most cases DCC can only be used for one purpose. The target application cannot send printf output and system data if not designed into one protocol.