2024-02-13 05:43 PM
2024-02-13 07:05 PM
Ensure BOOT0 is pulled to ground.
Debug the code, see where it's at when it's "not in the main". You can attach a debug probe and start a session without downloading the code or resetting if you edit the debug configuration.
Monitor the VBAT current usage by putting an inline resistor and monitoring the current usage. Verify that it matches what the datasheet specifies and if not, then address if necessary.
Consider attaching schematic for review or consulting the F7 hardware design guide.
2024-02-14 10:45 PM
What is your schematics?
Do you have a connection between VBAT and VDD, somewhere?
Do you use voltage scaling? Can it be that your FW runs still "full speed", does not power down (voltage range), does not slow down the clock... so that it keeps running from VBAT (but full speed)?
Hard to say without details.
What about to use an external power supply instead of coin cell?
Adjust the voltage (e.g. to see it comes back if VBAT is VDD), measure the current...
Try to connect with debugger in "low power mode" or "under reset"...
What do you do on FW when the VDD power gets off...?
To you have a "wake up" mechanism (wakeup button)...?