cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL: NVIC_SystemReset() not working when SUBGHZ Radio already initialized

manuelambaum
Associate II

Hi,

I am facing a strange reset-related issue on my STM32WLE LoRa boards involving the SUBGHZ radio and the RF switch.

My application sometimes needs to trigger an NVIC_SystemReset() or I reset the board through the NRST pin.
However, a reliable reset only occurs when the SUBGHZ radio is explicitly placed into Standby mode and both TX and RX lines of the external RF switch are turned off before the reset.

Here is what I observe:

Working sequence

  1. Put SUBGHZ radio into Standby mode

  2. Disable the RF switch (TX = OFF, RX = OFF)

  3. Call NVIC_SystemReset()
    → After reset, execution always starts correctly at flash address 0x08000000 (line 0 of my application).

Non-working sequence

  1. Call NVIC_SystemReset() while the SUBGHZ radio or RF switch is still active
    → The system reset seems to occur only partially:
    • the CPU resets (peripheral turns visibly off), but
    • execution does not jump to the reset vector at 0x08000000

 

For the NRST-Pin. According to the reference manual, this pin needs to be pulled down for at least 20us, which I haven't measured but I am really sure it performs a reset since the peripheral turns off, but the program does not start from line zero again. If I push the NRST-Button for like 500ms or longer, the reset just works fine. The NRST-Button has a 0,1uF decoupling capacitor according to the datasheet. 

One could argue, that this is not a big issue, since I can just put the Radio in standby and turn off the RF-Switch before performing a reset. However, what happens if my IWDG triggers a system reset? In this case I cannot turn the Radio off before a reset and my MCU gets stuck.

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
manuelambaum
Associate II

I solved the problem. It had something to do with the flash option bytes where I started from a different address at reset

View solution in original post

3 REPLIES 3
TDK
Super User

> execution does not jump to the reset vector at 0x08000000

Other than things "not working", how do you know this? As opposed to the code running there but some other issue is causing it to malfunction.

If you feel a post has answered your question, please click "Accept as Solution".

Make sure nothing external is Driving the pin High..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
manuelambaum
Associate II

I solved the problem. It had something to do with the flash option bytes where I started from a different address at reset