2020-06-09 08:30 AM
Hi,
when i use sleep mode, i have a reset problem on STM32L431CCT6 only on recent batches.
I implemented the workaround described in section 2.2.5 of dm00218224-stm32l431xx-device-errata-stmicroelectronics.pdf but without success.
The problem only affects recent batches (# 948, 950). The previous batches seem ok (n ° 745, 928).
Any ideas?
Regards
2020-06-09 08:48 AM
Is the reset specifically caused by waking and entering stop mode quickly?
Do the reset bits indicate the cause was a BOR reset or by something else?
2020-06-10 02:18 AM
the reset is caused by iwatchdog but i don't know why. To have the problem, I must have:
a stm32 from a recent batch
SW launched without JTAG
SLEEP mode activated (every ms in my case).
One difficulty is that when I try to debug and connect JTAG, the problem does not occur.
2020-06-10 02:59 AM
> the reset is caused by iwatchdog
IWDG?
How is it set up? How do you refresh it, exactly? How are the clocks managed across the stop mode?
Reduce your code to a minimal complete compilable exhibiting the problem,
JW
2020-06-10 05:59 AM
Check the settings in the option bytes. You may have the flag set to start IWDG immediately after a reset.
Jack Peacock
2020-06-10 06:05 AM
Yes IWDG.
The IWDG configuration:
=> reset if no kick since 2s
The IWDG is kicked every second
The SLEEP activation is done with the HAL command: HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON,PWR_SLEEPENTRY_WFI)
The STM32 is configured in external clock mode and the clock is always active
2020-06-10 06:20 AM
I think the IWDG work well. I removed the IWDG activation from my SW to suppress the reset.
With this code, sometimes the UART stops but the other tasks seem to work well and sometimes all the tasks seem to stop.
I will try to reproduce with a minimal code.
2020-06-10 06:26 AM
Sounds like IWDG is causing the reset and that it's not spurious.
2020-06-10 06:29 AM
> The IWDG is kicked every second
Isn't this the case of unstable LSI, as per ES0318 - Rev 5 2.2.8 Unstable LSI when it clocks RTC or CSS on LSE ?
Can you output LSI somehow, to observe?
JW
2020-06-10 06:55 AM
I already tried with an IWDG prescalar set to 256 and I still have a reset.