Open
Description
What happened ?
Interrupt lock need to be added to log functions, calling from ISR could enter deadlock mostly for serial logging. #2649
Options:
- Remove all logging from ISR.
- Defer ISR logging, should be difficult with va_args.
- Add interrupt lock, but macros need to be reworked since we don't know if they are called from device or host or typec stack in order to toggle interrupt accordingly.
- Add a simple re-entrancy flag to skip printf.
Edit:
I must have bad memory, I met log racing while debugging dwc2 DMA with RTT but SEGGER_RTT_Write() is ISR-safe, it must happened inside libc printf().
How to reproduce ?
Run examples on ports who has log in ISR, like NRF5x.