2025-05-23 10:06 AM
Correct me if I'm wrong, but it seems that ITM_SendChar() is blocking on the character transmission. Has anyone attempted to compensate for this or do people just put up/move to a UART?
At this point all I can think of is to implement a FIFO queue and tie a timer interrupt to it to fake the equivalent of Transmit Data Register Empty. Thoughts?
FYI I'm using an STM32F411 in CubeIDE and Keil uVision connected via ST-Link/V2.
2025-05-23 10:55 AM
It has to be blocking. There is no buffer available for storing data to be sent out here. It’s a low level cortex interface. Dont think there’s an interrupt like TXE you can co-opt for this.
I use UART.
2025-05-23 11:22 AM
People just put up or move to a UART. Optionally with DMA.
2025-05-23 12:18 PM
Yeah, a TIM or SysTick.
Or you can wrap such that it can either send immediately or enqueue. Perhaps pump in a yield routine or the main loop
So checking queue and outputting as available, but leaving immediately if not ready.
2025-05-24 4:38 AM - edited 2025-05-24 4:40 AM
This basically is the Segger RTT library for J-Link. Pity that ST does not offer a similar library for ST-Link. Keil has something like that too, and it works with ST-Link, but only for use with their own debugger IIRC.