2017-05-12 02:02 AM
I've noticed this behaviour in Atollic TrueStudio 7.0.1 and 7.1.2, using the ST-Link V2 debugger (several variants, including the regular ST-Link V2 and the ISOL version). When I place a breakpoint in the code, the execution stops at the breakpoint, I can inspect variables and otherwise interact with the device under test, but the device continues to run.
The debugger is clearly in 'Suspended' mode, but the target is running : status LEDs are still blinking and it's responding to its environment. When I try to step through the code, it jumps to a seemingly random location instead of going to the next line. This is a recent bug, doesn't happen all the time, and a colleague of mine has also experienced it recently.
Running our own code on a STM32L151RB. Any ideas?
Thanks in advance.
#stm32l1 #st-link/v2 #debugging #atollic #truestudioSolved! Go to Solution.
2017-05-12 05:13 AM
Thanks,
It turns out it was the watchdog timer that wasn't properly frozen. I added the following line to my watchdog init function and it seems it has fixed the issue:
DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP, ENABLE);
2017-05-12 02:51 AM
Perhaps you have disabled the flash download before debugging ? (Options->Debugger->Download)
I suggest to enable 'Verify Download' within the same menu as well.
Sounds like your target application does not match the source code.
2017-05-12 05:13 AM
Thanks,
It turns out it was the watchdog timer that wasn't properly frozen. I added the following line to my watchdog init function and it seems it has fixed the issue:
DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP, ENABLE);