how to issue one time software reset STM32F0xx after power up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 8:32 AM
I need issue software reset after 1s when power up stm32f0xx, like press hardware reset button but i need in software. plz help me implement only one time after amount 1 second when power up stm32.
Solved! Go to Solution.
- Labels:
-
STM32F0 Series
-
TIM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 9:02 AM
You can check if the last reset was a software reset by reading RCC_CSR flags.
You can check the approximate time from reset by looking at HAL_GetTick() >= 1000.
You can perform a software reset by calling HAL_NVIC_SystemReset.
Put those three together.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 8:42 AM
In reset flag you can check power on reset and do for example iwdg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 9:02 AM
You can check if the last reset was a software reset by reading RCC_CSR flags.
You can check the approximate time from reset by looking at HAL_GetTick() >= 1000.
You can perform a software reset by calling HAL_NVIC_SystemReset.
Put those three together.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 5:01 PM
Thanks for answer!
it not what i want. i can use iwdg or NVIC_SystemReset in normal mode, but not in this situation.
after power up MCU, if i put NVIC_SystemReset in code or timer, next time it will reset, but i only want it reset one time. And, after reset it will working normal and do not executed reset command any more. (only executed soft reset one time when power up)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 6:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 11:35 PM
@TDK​
Thanks so much, i dont know stm32 have some reset flag to monitor reset status of MCU. This is exactly what i need, just monitor SFTRSTF bit in RCC_CSR will know hardware or software reset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-30 11:55 AM
Taka a note that the software reset bit (SFTRSTF) will be set also on NRST pin reset and therefore on POR/BOR resets also. Most likely you have to check POR/BOR or NRST reset flags for your goal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-30 8:20 PM
Thanks for your suggestion Piranha.
