cancel
Showing results for 
Search instead for 
Did you mean: 

Independent Watchdog Freezing in debug mode

diego ambroggi
Associate III

Hello everyone,

I have to freeze watchdog during debug mode because it geneates problems (the same old story).

I tried to use __HAL_DBGMCU_FREEZE_IWDG(); before main loop, but this is not the right solution.

Have some tips?

Best regards

PS: I use an STM32F303 and I generate code using CubeMx tool.

My toolchain is Atollic TrueSTUDIO

3 REPLIES 3

Do you enable the SYSCFG/DBGMCU clock before changing the settings?

Other alternatives being to turn off the IWDG (don't use it), or emulate behaviour with a high priority TIM/IRQ or SysTick that is more aware of being stopped in debugger.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
diego ambroggi
Associate III

No i didn't.

I haven't see IWDG stop funtions :(

I tried to use HAL_IWDG_Refresh(&hiwdg); in a high priority timer interrupt but I had problems anyway :(

>>I haven't see IWDG stop functions

Kind of defeats the point, the idea would be to fully debug the app first, and instrument things like the Hard Fault Handler, and have a more soft watchdog alert/log/profile catch the things that aren't hardware latchups.

Watch for interrupt storms, if you don't clear a source the handler will tail-chain endlessly, and not foreground execution, or lower/equal preemptions.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..