cancel
Showing results for 
Search instead for 
Did you mean: 

IWDG initialization Error.

Rghar.1
Associate

In my project there is requirement to initialize the IWDG for two times one with time period 5 second in run-mode and re-configuring it for 32 second before controller enters into sleep mode. as shown in below code.

hiwdg.Instance = IWDG;

hiwdg.Init.Prescaler = IWDG_PRESCALER_64;

hiwdg.Init.Window = 4095;

hiwdg.Init.Reload = 2560;

if (HAL_IWDG_Init(&hiwdg) != HAL_OK) {

Error_Handler();

}

{

//Blocks Of statements

}

hiwdg.Instance = IWDG;

hiwdg.Init.Prescaler = IWDG_PRESCALER_256;

hiwdg.Init.Window = 4095;

hiwdg.Init.Reload = 4095;

if (HAL_IWDG_Init(&hiwdg) != HAL_OK) {

Error_Handler();

}

HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON,PWR_SLEEPENTRY_WFI);

But getting issues in second initialization. second initialization is getting failed.

Using STM32l4r5 controller.

someone please help me out in this issue. thanking in advance.

2 REPLIES 2

What exactly means "second initialization is getting failed", what are the symptoms?

JW

TDK
Guru

That code runs fine for me on an H7 chip. Don't have an L4 to try.

If you feel a post has answered your question, please click "Accept as Solution".