Skip to main content
Visitor II
February 5, 2024
Solved

NMI Fault While Debugging (STM32G474 nucleo board)

  • February 5, 2024
  • 1 reply
  • 1020 views

Hello,

I keep getting an NMI fault when I attempt to read a variable with gdb (either with a mouseover on a variable in STM32CubeIDE or the print [var] command in gdb). I'm not seeing anything useful when I view the microprocessor registers after the fault.

I'm using the stm32g474 hal library along with a linker, startup file, and interrupt _it files that are normally generated by default with the STM32CubeMX software for a G474 nucleo board. However, I'm using cmake 2.47.6 and the arm gcc/g++ toolchain 11.2-2022.02 for the build process.

Thank you

Best answer by mƎALLEm

Hello,

According the the user manual, there are three sources to generate an NMI:

  1. Clock security system (CSS)
  2. Flash ECC error
  3. Parity check SRAM1/CCM SRAMs. 

I suspect the 3rd choice: Parity check

So check the user option byte SRAM_PE value in option bytes menu in STM32CubeProgrammer.



1 reply

mƎALLEm
mƎALLEmAnswer
Technical Moderator
February 5, 2024

Hello,

According the the user manual, there are three sources to generate an NMI:

  1. Clock security system (CSS)
  2. Flash ECC error
  3. Parity check SRAM1/CCM SRAMs. 

I suspect the 3rd choice: Parity check

So check the user option byte SRAM_PE value in option bytes menu in STM32CubeProgrammer.



To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.