NVIC_SystemReset() is in reality NVIC_CoreReset()? STM32F105rbT6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-16 5:59 AM
Hi , i couldnt find any clear solution to this issue:
I need to trigger a software System Reset to enter into stm32´s bootloader.
- So far NVIC_SystemReset() only resets the core and i cant use it to enter stm32 bootloader, am i missing something?
NVIC_SystemReset();
- Reloading the IWDG with the wrong value also triggers a core reset?
WRITE_REG((_hiwg)->Instance->KR, (IWDG_KEY_RELOAD+1));
The only way i´ve been able to generate a System reset has been letting the IWDG counter reach 0 :\
Solved! Go to Solution.
- Labels:
-
RESET
-
STM32F1 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-17 3:15 AM
okay i found it, i was trying to do a HAL_Delay(); inside one interruptionjust before the NVIC_SystemReset();
that was jamming my core because inside interruptions there is no systick going on.
NVIC_SystemReset(); does trigger a system reset now and it always had .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-16 7:33 AM
Please tell us what your MCU / series is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-16 7:54 AM
of course : STM32F105rbT6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-16 11:47 PM
Don't have a F1 device on my bench. But
> NVIC_SystemReset() only resets the core
How did you find out?
If you can check that a low pulse on NRST is generated --> system reset. In addition, start a timer PWM which should stop after system reset. Tested on a STM32L432KC.
You can set the IWDG timeout as small as 100µs @40 kHz LSI clock. Shouldn't be a problem.
After reset you can inspect IWDGRSTF flag in RCC_CSR register to differenciate an IWDG reset from a normal reset. With some code in the Reset_Handler you may safely jump to system memory in that case without needing external circuitry.
hth
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-17 2:07 AM
> > NVIC_SystemReset() only resets the core
> How did you find out?
My f105 is driving some leds with pwm and gpios, so when a system reset happens all LED go off (quite visual)
If just a core reset happens the LEDs remain lit.
> If you can check that a low pulse on NRST is generated
ill check this , thanks
> After reset you can inspect IWDGRSTF flag in RCC_CSR register to differenciate an IWDG reset from a normal reset. With some code in the Reset_Handler
> you may safely jump to system memory in that case without needing external circuitry.
I am exploring this option now, my plan is to jumpAddress to the factory stm bootloader after deactivating interruptions, timers and watchdogs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-17 3:15 AM
okay i found it, i was trying to do a HAL_Delay(); inside one interruptionjust before the NVIC_SystemReset();
that was jamming my core because inside interruptions there is no systick going on.
NVIC_SystemReset(); does trigger a system reset now and it always had .
