cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 sometimes hangs after NVIC_SystemReset()

PGoud
Associate III

About once over 10, the MCU seems to hang after NVIC_SystemReset() call. Notice that:

  • The MCU restarts correctly after poweron reset,
  • NRESET set to 0 then 1 does NOT restart the MCU
  • When MCU is hung, the NRESET Level is correctly UP (thanks to internal pull-up)

5 REPLIES 5

Is this a custom board? Is anything else driving NRESET?​

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

Yes it is a custom board.

NRESET is only connected through a 1nF capacitance toward 0v.

But notice that when the MCU is hung, the level at NRESET is 3.2 V

PGoud
Associate III

New information.

I can systematically set my MCU in this "hung" mode after :

  • Init of my board (HAL, Clock etc ...) and GPIOs THEN NVIC_SystemReset()

BUT this is systematically "hanging" ONLY if

  • my software has just been reprogrammed and automatically restarted
  • my board is attach to the programming STLink (obviously it has just been reprogrammed ;O),

This with a production (not debug) software that set :

  • JTMS/JTCK/JTDI/JTDO in MODE ANALOG / NO PULL
  • JNRESET in MODE INPUT / PULL UP

STLink connected to NRST?

JW

PGoud
Associate III

Sometimes.

The problem can occur connected or not connected.

But for a while I thougt it was easyer to produce when connected and software has just been programmed.