Skip to main content
Graduate II
May 22, 2024
Question

STM32G051G6U6 IWDG not refreshing

  • May 22, 2024
  • 1 reply
  • 922 views

Hi,

I am facing an issue with IWDG in  STM32G051G6U6.

HAL_IWDG_Refresh(&hiwdg);  not refreshing IWDG and  the core resets after IWDG overflow time.

IWDG overflow is set at 13Sec (varying wrt prescaler) and I am refreshing it at every 1 sec.

Counter prescaler 128,  window value 4095, down counter 4095, Core Frq 40Mhz

Only few test program lines are loaded to toggle an led @ 1 Hz with the help of two HAL_Delay (500);  gpio toggle followed by HAL_IWDG_Refresh(&hiwdg); 

Another problem noticed was, TIM17( APB bus frq 40Mhz) was not running or ISR (NVIC enabled) is not serving when I deactivate IWDG.

I think i missed something else as the same board worked perfectly with all peripherals. Only change I made was Cube IDE update.

    This topic has been closed for replies.

    1 reply

    ST Employee
    May 22, 2024

    Hello @ManishNair

    Make sure there are no blocking functions or delays that prevent the refresh call from executing in time 

    Also, can you confirm that the same setup using IWDG config worked before? which CubeIDE version are you using? 

    Graduate II
    May 22, 2024

    Cube IDE 1.14.1

    The same setup worked before!

    Also my variables are not displayed in build analyzer. RAM size is not updating wrt buffer length...

    I doubt some error in CUBE IDE... Can you suggest a stable version of cubeIDE. I faced several issues with ver.1.15.1 ( STM32F070  usb not working)