2026-01-28 7:26 AM - last edited on 2026-02-04 6:30 AM by mƎALLEm
Environment: STM32L4 + 32.768K LSE
Function: Wake up and work once every hour, then enter stop2 mode. During the one-hour sleep, wake up every ten minutes to feed the external watchdog.
Problem: The device resets directly when waking up every ten minutes.
Current known information: The device was tested in the company for over twenty days without any issues (including restarts, freezes, etc.). After the prototypes were given to customers, problems started to occur in about 10 to 20 days. Currently, there are two failed devices. After power cycling, the devices did not return to normal. External reset also did not restore them to normal. Re-flashing the devices allows them to operate normally, and they are currently under continuous pressure testing to see if the issue will recur.
Current debugging progress: When the device restarts, the nRST pin has a low-level time of less than 1ms. The 3.3V power supply pin of the MCU is stable as observed by the oscilloscope. The TP5010_DONE_Pin has a 40ms high-level time during each ten-minute wake-up period (HAL_Delay(1) --> SystemCoreClock configured at 80M, after low-power wake-up, it switches to the default 4M of MSI, reducing by 20 times, plus the HAL_GPIO_WritePin time, which is exactly 40ms), but during the first low-power entry, it has a high-level time of over 20ms (caused by unstable PLL switching to MSI?).
------------------------------------------------------------------------------------
2026/02/03 23:18 UPDATE:
Environment:
50 mAh battery + STM32L4 MCU + 32.768 kHz LSE crystal + 4G module + GPS module + solar charging panel
Functionality:
Problem:
The device occasionally resets during these 10-minute wake-up intervals.
Known Information:
Current Observations & Issues:
Current Analysis:
Current Questions:
Next Steps:
2026-01-29 9:38 AM
So very much a possibility of brownouts if the battery gets low ...
Do you monitor the battery level to ensure that you don't try to run on a flat battery?
In particular, that you don't try to write to Flash on a low battery?
2026-01-29 10:29 AM
@daniaoday wrote:Environment: STM32L4 + 32.768K LSE
Function: Wake up and work once every hour, then enter stop2 mode. During the one-hour sleep, wake up every ten minutes to feed the external watchdog.
Problem: The device resets directly when waking up every ten minutes.
Try little match : your bat in OK state can do 45mA one hour. Every hour your code work time on 80M is how long ??? STOP2 isnt hour when every ten min exist next wakes ... How is complete current your design on run mode and on stop ? My tip is MCU 8mA + 7mA other =15mA If run time is one minute every hour , then your design deplete bat after 3x 60 hours around 7days
You dont reply how batery type and voltage used?
2026-01-29 10:31 AM
Guys, if the battery was failing or running out, the 3V3 line would be dropping, no? And it wouldn't be recovering after a reset.
2026-01-29 10:45 AM
@TDK wrote:Guys, if the battery was failing or running out, the 3V3 line would be dropping, no?
I get the impression the 3V3 line has only been verified in the lab ?
But the devices are failing in the field - where the state of the battery (and, thus, 3V3) are unknown ?
2026-01-29 12:07 PM
This cleared it up for me. But I could be missing something.
> The oscilloscope captured 3.3V on one channel and nRST on the other, with the nRST channel set to trigger mode. It was found that when the nRST signal had a falling edge, there was no fluctuation on the 3.3V line.
It would always be good to see actual scope plots with this information rather than just text. Sometimes things are left out or misinterpreted.
2026-01-29 5:42 PM
2026-01-30 3:43 AM
OK then forget to Vdd issue. Trouble is sw. Check PLL recovery waiting is ok in your sw.
Good practice use only MSI without PLL.
Check if some code on fail dont have sw reset call in code etc. For example stack fail...
2026-01-30 3:59 AM - edited 2026-01-30 4:00 AM
2026-01-30 4:41 AM - edited 2026-01-30 4:47 AM
Additionally, STM32CubeProgrammer occasionally crashes when connecting to the faulty device.
2026-01-30 4:54 AM
Regarding the issue where STM32CubeProgrammer cannot read the Flash, I came across a forum post mentioning that the problem is often due to the chip not being correctly selected. However, in my case, the chip has already been properly recognized.
https://community.st.com/t5/stm32cubeprogrammer-mcus/missing-database-files/td-p/81261
SWD communication should be fine.
And the device has already been correctly identified.