161 #ifndef ti_drivers_ITM__include 162 #define ti_drivers_ITM__include 168 #include <ti/devices/DeviceFamily.h> 178 #define ITM_BASE_ADDR (0xE0000000) 184 #define ITM_DWT_BASE_ADDR (0xE0001000) 190 #define ITM_SCS_BASE_ADDR (0xE000E000) 196 #define ITM_TPIU_BASE_ADDR (0xE0040000) 204 #define ITM_LAR_UNLOCK (0xC5ACCE55) 211 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) 212 #define ITM_FUNCTION_DISABLED (0x00) 213 #define ITM_FUNCTION_EMIT_PC (0x30 | 0x4) 214 #define ITM_FUNCTION_EMIT_DATA_ON_READ_WRITE (0x800 | 0x20 | 0xc) 215 #define ITM_FUNCTION_EMIT_PC_ON_READ_WRITE (0x800 | 0x30 | 0x2) 216 #define ITM_FUNCTION_EMIT_DATA_ON_READ (0x800 | 0x20 | 0xe) 217 #define ITM_FUNCTION_EMIT_DATA_ON_WRITE (0x800 | 0x20 | 0xd) 218 #define ITM_FUNCTION_EMIT_PC_AND_DATA_ON_READ (0x800 | 0x30 | 0xe) 219 #define ITM_FUNCTION_EMIT_PC_AND_DATA_ON_WRITE (0x800 | 0x30 | 0xd) 221 #define ITM_FUNCTION_DISABLED 0x00 222 #define ITM_FUNCTION_EMIT_PC 0x01 223 #define ITM_FUNCTION_EMIT_DATA_ON_READ_WRITE 0x02 224 #define ITM_FUNCTION_EMIT_PC_ON_READ_WRITE 0x03 225 #define ITM_FUNCTION_EMIT_DATA_ON_READ 0x0C 226 #define ITM_FUNCTION_EMIT_DATA_ON_WRITE 0x0D 227 #define ITM_FUNCTION_EMIT_PC_AND_DATA_ON_READ 0x0E 228 #define ITM_FUNCTION_EMIT_PC_AND_DATA_ON_WRITE 0x0F 237 #define ITM_port32(n) (*((volatile unsigned int *)(ITM_BASE_ADDR + 4 * n))) 250 #define ITM_send32Polling(n, x) \ 253 while (0 == ITM_port32(n)) \ 263 #define ITM_port16(n) (*((volatile unsigned short *)(ITM_BASE_ADDR + 4 * n))) 271 #define ITM_send16Polling(n, x) \ 274 while (0 == ITM_port16(n)) \ 284 #define ITM_port8(n) (*((volatile unsigned char *)(ITM_BASE_ADDR + 4 * n))) 292 #define ITM_send8Polling(n, x) \ 295 while (0 == ITM_port8(n)) \ 311 #define ITM_BASE_HWATTRS \ 312 ITM_TPIU_PortFormat format; \ 313 uint32_t traceEnable; \ 314 uint32_t tpiuPrescaler; \ 315 uint32_t fullPacketInCycles; \ 533 extern void __attribute__((weak))
ITM_flush(
void);
546 extern
void __attribute__((weak))
ITM_restore(
void);
void ITM_enableEventCounter(bool prescale1024, uint8_t postReset)
Enable generation of event counter packets using the DWT POSTCNT timer.
#define ITM_FUNCTION_EMIT_PC_AND_DATA_ON_READ
Definition: ITM.h:218
bool ITM_open(void)
Open and configure the ITM, DWT, and TPIU. This includes muxing pins as needed.
void ITM_send16Atomic(uint8_t port, uint16_t value)
Write a 16-bit short to the given stimulus port, polling to ensure the port is available.
void ITM_enableSyncPackets(ITM_SyncPacketRate syncPacketRate)
Enable the generation of synchronization packets from the ITM based on the CYCCNT counter...
void ITM_enableTimestamps(ITM_TimeStampPrescaler tsPrescale, bool asyncMode)
Enable the generation of local timestamp packets from the ITM module These are packets sent form the ...
ITM Hardware Attributes.
Definition: ITM.h:324
void ITM_enableExceptionTrace(void)
Enable exception tracing This will trigger the DWT to generate packets when the device enters or leav...
#define ITM_FUNCTION_EMIT_DATA_ON_READ
Definition: ITM.h:216
ITM_SyncPacketRate
Synchronous packet generation rate based on cycles of CYCCNT This controls how often sync packets wil...
Definition: ITM.h:361
void ITM_send8Atomic(uint8_t port, uint8_t value)
Write an 8-bit byte to the given stimulus port, polling to ensure the port is available.
ITM_TPIU_PortFormat
Definition: ITM.h:300
void ITM_disableExceptionTrace(void)
Disable exception tracing.
bool ITM_enableWatchpoint(ITM_WatchpointAction function, const uintptr_t address)
Enable the watchpoint functionality using a DWT comparator.
void ITM_enablePCSampling(bool prescale1024, uint8_t postReset)
Enable periodic sampling of the program counter using the DWT POSTCNT timer.
#define ITM_FUNCTION_EMIT_DATA_ON_READ_WRITE
Definition: ITM.h:214
#define ITM_FUNCTION_DISABLED
Device-specific values that implement the generic ITM-functions in ITM_WatchpointAction.
Definition: ITM.h:212
ITM_WatchpointAction
Control the action taken by the DWT on comparator match.
Definition: ITM.h:332
#define ITM_FUNCTION_EMIT_PC_ON_READ_WRITE
Definition: ITM.h:215
ITM_TimeStampPrescaler
Prescaler for ITM timestamp generation based on the trace packet reference clock. ...
Definition: ITM.h:349
#define ITM_FUNCTION_EMIT_PC
Definition: ITM.h:213
#define ITM_FUNCTION_EMIT_PC_AND_DATA_ON_WRITE
Definition: ITM.h:219
void ITM_restore(void)
Prepare the ITM hardware to return from power off of CPU domain This will reenable DWT features...
void ITM_flush(void)
Flush the ITM in preparation for power off of CPU domain.
#define ITM_FUNCTION_EMIT_DATA_ON_WRITE
Definition: ITM.h:217
void ITM_disablePCAndEventSampling(void)
Disable program counter and event sampling in the DWT.
void ITM_sendBufferAtomic(const uint8_t port, const char *msg, size_t length)
Write the contents of a buffer to the stimulus port, polling to ensure the port is available...
void ITM_send32Atomic(uint8_t port, uint32_t value)
Write a 32-bit word to the given stimulus port, polling to ensure the port is available.