IWDG initialization Error.
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.
