Skip to main content
Visitor II
August 1, 2024
Question

Hard Reset STM32

Hi i want to hard reset my MCU once after 5 minutes is there any way to implement it i know i can do this  by NVIC_SystemReset(); but i just want to do it once after power on the mcu

 

This topic has been closed for replies.

3 replies

Andrew Neil
Super User
August 1, 2024

@this_is_kd_singh wrote:

 i just want to do it once after power on the mcu


Why?

A power-on reset is "harder" than NVIC_SystemReset()...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
August 1, 2024

> i know i can do this  by NVIC_SystemReset()

But you don't want to use that? Why?

Tie a open drain GPIO pin to NRST and set it low to hard reset the chip.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
August 1, 2024

Perhaps stash a magic value in RAM at the 5 minutes reset, and flag to yourself not to do that again when you recognize that at start up.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..