User guide

8.7 Access from Thumb state
Because the Thumb instruction set does not contain coprocessor instructions, you cannot use the debug
communications channel while the core is in Thumb state.
There are three possible ways around this:
You can write each polling routine in a SWI handler, which can then be executed while in either ARM or Thumb
state. Entering the SWI handler immediately puts the core into ARM state where the coprocessor instructions
are available. Refer to Chapter 5 Handling Processor Exceptions for more information on SWIs.
Thumb code can make interworking calls to ARM subroutines which implement the polling. Refer to Chapter 3
Interworking ARM and Thumb for more information on mixing ARM and Thumb code.
Use interrupt-driven communication rather than polled communication. The interrupt handler would be written in
ARM instructions, so the coprocessor instructions can be accessed directly.
Debug Communications Channel
Copyright ?1999 2001 ARM Limited 8-10