CMSIS-Core (Cortex-M)
Version 5.1.1
CMSIS-Core support for Cortex-M processor-based devices
|
Debug Access to the Instrumented Trace Macrocell (ITM) More...
Functions | |
uint32_t | ITM_SendChar (uint32_t ch) |
Transmits a character via channel 0. More... | |
int32_t | ITM_ReceiveChar (void) |
ITM Receive Character. More... | |
int32_t | ITM_CheckChar (void) |
ITM Check Character. More... | |
Variables | |
volatile int32_t | ITM_RxBuffer |
external variable to receive characters More... | |
CMSIS provides additional debug functions to enlarge the Debug Access. Data can be transmitted via a certain global buffer variable towards the target system.
The Cortex-M3 / Cortex-M4 / Cortex-M7 incorporates the Instrumented Trace Macrocell (ITM) that provides together with the Serial Viewer Output (SVO) trace capabilities for the microcontroller system. The ITM has 32 communication channels; two ITM communication channels are used by CMSIS to output the following information:
A debugger may support a Debug (printf) Viewer window to display data.
Direction: Microcontroller –> Debugger:
Direction: Debugger –> Microcontroller:
Example for the usage of the ITM Channel 31 for RTOS Kernels:
int32_t ITM_CheckChar | ( | void | ) |
This function reads the external variable ITM_RxBuffer and checks whether a character is available or not.
int32_t ITM_ReceiveChar | ( | void | ) |
This function inputs a character via the external variable ITM_RxBuffer. It returns when no debugger is connected that has booked the output. It is blocking when a debugger is connected, but the previously sent character has not been transmitted.
uint32_t ITM_SendChar | ( | uint32_t | ch | ) |
This function transmits a character via the ITM channel 0. It returns when no debugger is connected that has booked the output. It is blocking when a debugger is connected, but the previously sent character has not been transmitted.
[in] | ch | Character to transmit |
volatile int32_t ITM_RxBuffer |