Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 6 months ago.
How to fix ? serial.printf stucks in WWDG_IRQHandler (but stdio printf works)
Hi, I have ported mbed to custom targets (STM32F3 and STM32L4), the project has been created via CLI and then exported to SW4STM32. Some serial.print statements are used and they are working fine.
I made a second project including compiled mbed instead of sources, the compiled mbed folder has been created with CLI tool (from the working mbed-os folder of the first project). This project compiles and works fine, except the serial.printf statements are ending in WWDG_IRQHandler which basically is a crash improperly handled, since it stucks here.
I also noticed something interresting, if stdio printf statements are used they are working fine. I believe somehow the mecanism redirecting stdio printf to the uart port is not the same as the one used for serial.printf (maybe it doesnt use stream?).
Anyway, that's how it is, on the project with mbed source both serial.printf and printf are working fine, none stucks in WWDG_IRQHandler. on the project with compiled mbed (totally identical otherwise), serial.printf always stucks in WWDG_IRQHandler and printf works fine. The problem is not related to the main code, it only do printf and serial.printf statements.
Does anyone have an idea on how to fix this?