Skip to main content
diego ambroggi
Associate III
November 6, 2018
Question

Independent Watchdog Freezing in debug mode

  • November 6, 2018
  • 3 replies
  • 1618 views

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

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    November 6, 2018

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    diego ambroggi
    Associate III
    November 6, 2018

    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 :(

    Tesla DeLorean
    Guru
    November 6, 2018

    >>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 (See Profile) Up vote any posts that you find helpful, it shows what's working..