Skip to main content
PGoud
Associate III
December 12, 2018
Question

STM32L4 sometimes hangs after NVIC_SystemReset()

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)

This topic has been closed for replies.

6 replies

Tesla DeLorean
Guru
December 12, 2018

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PGoud
PGoudAuthor
Associate III
December 12, 2018

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
PGoudAuthor
Associate III
December 12, 2018

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

waclawek.jan
Super User
December 12, 2018

STLink connected to NRST?

JW

PGoud
PGoudAuthor
Associate III
December 14, 2018

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.

corben wang
Visitor II
November 7, 2024

I ran into the exact same failure phenomenon, and I'm using an STM32L451CC.Is there a solution yet?