cancel
Showing results for 
Search instead for 
Did you mean: 

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

Tom MacDonald
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

View solution in original post

10 REPLIES 10
Peter BENSCH
ST Employee

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

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

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

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

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

No that is to stop the oscillator in standby mode not stop mode

Just reread my message carefully and look at your previous screenshot!

Tom MacDonald
Associate III

You right!

Tom MacDonald
Associate III

@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?

Piranha
Chief II

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