2018-11-06 08:00 AM
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
2018-11-06 08:16 AM
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.
2018-11-06 08:23 AM
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 :(
2018-11-06 08:32 AM
>>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.