cancel
Showing results for 
Search instead for 
Did you mean: 

NVIC_SystemReset() is in reality NVIC_CoreReset()? STM32F105rbT6

Javier1
Principal

Hi , i couldnt find any clear solution to this issue:

I need to trigger a software System Reset to enter into stm32´s bootloader.

0693W000008GIrMQAW.png 

  • 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 :\

we dont need to firmware by ourselves, lets talk
1 ACCEPTED SOLUTION

Accepted Solutions

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 .

we dont need to firmware by ourselves, lets talk

View solution in original post

5 REPLIES 5
KnarfB
Principal III

Please tell us what your MCU / series is.

of course : STM32F105rbT6

we dont need to firmware by ourselves, lets talk
KnarfB
Principal III

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

> > 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.

we dont need to firmware by ourselves, lets talk

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 .

we dont need to firmware by ourselves, lets talk