cancel
Showing results for 
Search instead for 
Did you mean: 

IWDG reset in stop mode

Stabilo
Associate III

Hello everyone,

I have currently two issues with the STM32F411CC STOP mode, it could be great to have some support.

I want to wake up each 1sec by an RTC interrupt. Here is my sequence to enter STOP mode:

  • Clear RTC_WUTF flag
  • Clear PWR_WU flag
  • Enable wake up timer interrupt
  • Disable systick
  • Enable flash power down in STOP mode
  • Enter STOP mode (Low power voltage regulation, WFI).

These are my 2 issues:

1) the current consumption of my system is ~5mA.

2) after a certain amount of time in STOP mode (~20min), the MCU is reset by IWDG. Note that when I wake up the MCU each 1sec, I also reload the IWDG to a period of 8 seconds ...

Do you have any idea ?

Thanks a lot

2 REPLIES 2
TDK
Guru

Resetting IWDG should prevent it from resetting the MCU. Perhaps there is a bug in your code causing this. Hard to provide much useful info. Probe the IWDG during your 1sec wakeups to ensure it's actually being reloaded.

Are you checking the reset bits to ensure the IWDG was the source of the reset?

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

Thank you for you answer,

I think the WDG is well reloaded, but the problem may come from my "wake up" code (basically reloading the WDG and re-enabling the wake up timer). It looks like the code get stuck somewhere here. I will check that.

Yes, I am checking the reset bits and I am sure the reset is triggered by the watchdog.

For the current consumption problem, it was solved (not an issue from the STM).