| |||
| Home > Debug Communications Channel > Access from Thumb state | |||
On processors with architecture earlier than the ARM architecture v6T2, you cannot use the debug communications channel while the processor is in Thumb state, because there are no Thumb coprocessor instructions.
There are three possible ways around this:
You can write each polling routine in a SVC handler, which can then be invoked while in either ARM or Thumb state. Entering the SVC handler immediately puts the processor into ARM state where the coprocessor instructions are available.
Thumb code can make interworking calls to ARM subroutines that implement the polling.
Use interrupt-driven communication rather than polled communication. The interrupt handler runs in ARM state, so the coprocessor instructions can be accessed directly.