160 #ifndef ti_drivers_ITM__include 161 #define ti_drivers_ITM__include 176 #define ITM_BASE_ADDR (0xE0000000) 182 #define ITM_DWT_BASE_ADDR (0xE0001000) 188 #define ITM_SCS_BASE_ADDR (0xE000E000) 194 #define ITM_TPIU_BASE_ADDR (0xE0040000) 202 #define ITM_LAR_UNLOCK (0xC5ACCE55) 210 #define ITM_port32(n) (*((volatile unsigned int *) (ITM_BASE_ADDR +4*n))) 223 #define ITM_send32Polling(n, x) \ 226 while(0 == ITM_port32(n)); \ 235 #define ITM_port16(n) (*((volatile unsigned short *)(ITM_BASE_ADDR +4*n))) 243 #define ITM_send16Polling(n, x) \ 246 while(0 == ITM_port16(n)); \ 255 #define ITM_port8(n) (*((volatile unsigned char *) (ITM_BASE_ADDR +4*n))) 263 #define ITM_send8Polling(n, x) \ 266 while(0 == ITM_port8(n)); \ 282 #define ITM_BASE_HWATTRS \ 283 ITM_TPIU_PortFormat format; \ 284 uint32_t traceEnable; \ 285 uint32_t tpiuPrescaler; \ 286 uint32_t fullPacketInCycles; \ 490 const uintptr_t address);
506 extern void __attribute__((weak))
ITM_flush(
void);
519 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.
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:295
void ITM_enableExceptionTrace(void)
Enable exception tracing This will trigger the DWT to generate packets when the device enters or leav...
void ITM_disablePCAndEventSampling()
Disable program counter and event sampling in the DWT.
ITM_SyncPacketRate
Synchronous packet generation rate based on cycles of CYCCNT This controls how often sync packets wil...
Definition: ITM.h:331
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:271
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.
ITM_WatchpointAction
Control the action taken by the DWT on comparator match.
Definition: ITM.h:303
ITM_TimeStampPrescaler
Prescaler for ITM timestamp generation based on the trace packet reference clock. ...
Definition: ITM.h:319
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.
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.