cancel
Showing results for 
Search instead for 
Did you mean: 

Freeze watchdog in debug

ab val
Associate III
Posted on February 15, 2018 at 10:48

Hi,

I am trying to stop the watchdog when I hit suspend in TrueStudio. 

Is there something to add in the startup scripts? Or another option to do that ?

Thanks,

A.

2 REPLIES 2
Posted on February 15, 2018 at 14:03

Check DBGMCU settings (see also RM for your specific STM32 part)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 15, 2018 at 14:25

 ,

 ,

I did it that way:

/* IWDG init function */

 ,

static void MX_IWDG1_Init(void)

 ,

{

 ,

hiwdg1.Instance = IWDG1,

 ,

hiwdg1.Init.Prescaler = IWDG_PRESCALER_256,

 ,

hiwdg1.Init.Reload = 4095,

 ,

hiwdg1.Init.Window = 4095,

if(HAL_IWDG_Init(&,hiwdg1) != HAL_OK)

 ,

{

 ,

/* Initialization Error */

 ,

Error_Handler(),

 ,

}

♯ ifdef DEBUG

 ,

__HAL_DBGMCU_FREEZE_IWDG1(),

 ,

♯ else

 ,

♯ endif

}