2025-03-25 11:57 AM
I am working on a project using an STM32G4. I have a new board spin that I am bringing up and one of the four boards that I have brought up is exhibiting strange behavior exiting STOP1 mode.
I have code that can put the micro into one of 2 low power modes (Low power SLEEP, or STOP1) for a specified length of time. This has been working on our previous board rev without issue.
I have an 8 second watchdog running so I have set up a LPTIM to wake the device every 4 seconds to refresh the watchdog and then go back to either SLEEP or STOP1. With the one board in question, Low power SLEEP works exactly as expected; the device will sleep for 4 seconds, then wake up and refresh the watchdog, and go back to sleep. However, when this particular board is put into STOP1 mode, the LPTIM never wakes up the micro and the watchdog times out and system reboots.
I am only seeing this one of four new board and I have never seen this on previous board revs. This board does not seem to be exhibiting any other strange behaviors. I will be bringing up more boards to see if any others have this same issue. Is it possible that I just have a defective processor or is there something else I could be missing that I could try?
2025-03-25 2:47 PM
Dear @matkSENS ,
What is the source of the clock used for LPTIM to enter and wake-up from STOP1 mode ? if using internal clocks it should be either LSE or LSI , in case of LSI - The frequency depends and vary from part to part - you can see the STM32G4 Datasheet for the window of min/typical and maximum frequency and may be to measure and output the LSI clock and compare it versus the parts that are working for comparison.
Another hint, please check the STM32G4 Errata sheet and in particular :
2.9.1 Device may remain stuck in LPTIM interrupt when entering Stop mode
2.9.2 Device may remain stuck in LPTIM interrupt when clearing event flag.
Hope it helps.
STOne-32.