Skip to main content
Tom MacDonald
Associate III
July 13, 2022
Solved

Can LSI oscillator be disabled once the IWDG has started running on STM32G0 ?

  • July 13, 2022
  • 5 replies
  • 6873 views

In my application I have configured IWDG to start running.

I would like to prevent the IWDG from resetting the MCU while in stop 1 mode for extended period of time.

In the reference manual it says: "Once running, the IWDG cannot be stopped."0693W00000QL7NIQA1.png 

But in the RCC section of the manual it says

"The LSI RC can be switched on and off using the LSION bit in the Control/status register (RCC_CSR)."

0693W00000QL7NmQAL.png 

This would lead me to believe that its possible to turn off the LSI clock after the IWDG has been enabled.

If I try to turn off the LSI clock before entering Stop 1 mode, the MCU ends up being reset by the IWDG.

Is it true that LSI cannot be stopped ig IWDG has been engaged?

This topic has been closed for replies.
Best answer by Piranha

> There is no option byte to disable IWDG in Stop mode.

Bit 17 IWDG_STOP right between your yellow markers is literally that.

5 replies

Peter BENSCH
ST Technical Moderator
July 13, 2022

Correct, LSI cannot be stopped when the IWDG has been activated. This is also mentioned in RM0454, section 5.2.13:

If the Independent watchdog (IWDG) is started by either hardware option or software access, the LSI oscillator is forced ON and cannot be disabled.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Mvill.17
Associate III
July 13, 2022

Hi Peter

Is there the possibility to freeze the IWDG in STOP clearing the corresponding bit in the option byte?

I cleared it but when in STOP the IWDG is still working and reset my system.

So the question is what's the purpose of these bits in the option byte?

Thanks

Tom MacDonald
Associate III
July 14, 2022

There is no option byte to disable IWDG in Stop mode.

There is, however, and option byte to disable IWDB in Standby mode. I can confirm that in my application when I enter Standby mode that IWDG does not reset the MCU.

See page 65 of RM0454:

0693W00000QLGJtQAP.png

Piranha
PiranhaBest answer
Principal III
July 19, 2022

> There is no option byte to disable IWDG in Stop mode.

Bit 17 IWDG_STOP right between your yellow markers is literally that.

Tom MacDonald
Associate III
July 20, 2022

You right!

Tom MacDonald
Associate III
July 20, 2022

@Peter BENSCH​ 

Does that mean I can stop the IWDG from restarting my app if I go into stop mode and wait for interrupt (potentially indefinitely?) provided that I set the bit 17 to 0?

Visitor II
November 1, 2023

Hi @Peter BENSCH 

I have the same problem, does Tom right?

set the bit 17 to 0, can stop the IWDG?

Piranha
Principal III
July 20, 2022

It should be like that, but other people have problems. Could be related to the WB/WL parts with radio.

https://community.st.com/s/question/0D53W00001fQYksSAG/iwdg-in-stop2

Anyway, as many factors correlate with other low-power modes, you probably want to also read my article:

https://community.st.com/s/question/0D53W00001bnh8dSAA/how-to-enter-standby-or-shutdown-mode-on-stm32