cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L162 Watchdog and Stop Mode

sergetr
Associate II
Posted on March 09, 2017 at 20:22

Is it possible to enter Low Power Mode (Stop Mode) if the watchdog (Independent or windowed) is enable?

I know the independent watchdog cannot be disabled, but I though the windowed one could be disabled. I'm using CubeMx to configure my peripherals, and I don't find any function to disable the watchdog. So every time it fall into sleep, the watchdog reset the MCU.

3 REPLIES 3
S.Ma
Principal
Posted on March 09, 2017 at 20:44

The goal of a watchdog is to prevent the core to go haywire and screw up things as soon as possible.

The exceptions such as wrong op-code or wrong address would probably be the earliest event to be triggered, unless the program counter execute a small infinite loop. Here is where the independent watchdog comes into play.

What if the core execute dummy code with HALT instruction? The independent watchdog would freeze.

Here is where the window watchdog comes to play.

An application mecanism should exist to leave HALT state before the watchdog reset triggers.

Or at the beginning of the user code, test RCC_CSR to know that the reset came from Watchdog and branch from normal power on reset sequence....

sergetr
Associate II
Posted on March 09, 2017 at 21:03

Hi and thank you for your answer but I'm not sure to understand. My question was is it possible to use the watchdog and to go into low power mode (STOP Mode) without being reset by the watchdog?

Posted on March 09, 2017 at 21:12

Apparently yes. If the Independent watchdog is used and enabled, the MCU must have an application mechanism to restart the clock before a reset occurs...