cancel
Showing results for 
Search instead for 
Did you mean: 

Nx_Iperf NMI_Handler Error

SDu T
Associate III

Good Day

 

I homeone can help me.

I am using the Nx_Iperf project as a baseline for my MQTT implementation. I have application working and connectinf to the MQTT server and subscribe as well as publish works.

As I am now testing the code, I constantly get a NMI_Handler error. I have done the following:

1) Uninstall all STM32CubeIDE versions oon my machine

2) Uninstall STM32CubeMx

3) Cleaned the registry.

4) Deleted the project folders and created new blank folders.

5) Install STM32CubeIde V1.15.1

6) Installed STMCubeMX and allowed it to update.

7) Usef file import STM32 Examples, Found my processor( STM32H563) and found NX_Ipertf project.

 

The only changes I made was to change the HSE to Crystal/Ceramic Resonator.

SDuT_0-1718030469698.png

 

The project runs a bit and then I get the NMI_Handler error. How do I find the core reason for the error?

Can anyone suggest how to find the origin and why it would suddenly apper? While I was busy addding code I did not experience the error. I started to experience that yesterday when doing testing and running the code for longer periods.

I also experienced the same on another project using the STM32WL55. Other people using the same code does not find that error .

Both boards are custom boards. Is there something I need to check?

The Current Toolchain is GNU Tools for STM32 (12.3rel1)

5 REPLIES 5
Pavel A.
Evangelist III

The only changes I made was to change the HSE to Crystal/Ceramic Resonator.

NMI can be a symptom of clock failure. And CRS is disabled. Check the HSE stability.

I replaced the crystal and the loading caps just in case.

There is no change. I still get the Error. I am monitoring the crystal and 3.3V supply to see if there are any problems.

At this stage 3.3V  has very little noise and the crystal seems very stable

SDu T
Associate III

Hi

I added the following code to the NMI_Handler

volatile bool ignoreEccErr = true;

volatile bool eccDoubleBitErrOccurred = false;

 

/* Check if ECC double bit error occurred if ignoring ECC errors flag is set */

if (ignoreEccErr && (READ_BIT(FLASH->ECCDETR, FLASH_ECCR_ECCD) != 0U))

{

/* Reset the detection flag to enable detecting subsequent double bit ECC errors */

SET_BIT(FLASH->ECCDETR, FLASH_ECCR_ECCD);//FLASH_ECCR_ECCD

eccDoubleBitErrOccurred = true;

return;

}

 

Now the code jumps over the NMI_Handler and stops at the HardFault_Handler.

SDuT_0-1718125317066.png

 

 

SDu T
Associate III

Good day

I recreated the Nx_Iperf project (again) from downloading it from the STM Examples using the STMCubeIde tool.

As I have a crystal connected on my custom board I have to change the HSE to a crystal

SDuT_0-1718264146579.png

Then I need to Setup the Crystal speed to match the Fitted Crystal. I used the "Resolve Clock issues" for STM32CubeIDE to set the output clock speeds to 250MHz(Circled in green)

Last night when I followed the same process I changed the PLL1 setting downwards to give me an output of 231MHz.

SDuT_1-1718264485210.png

 

The board has been running through the night Without crashing. Code is the same. Can someone please explain to my why this works. Or if I run at the Max speed of 250MHz, what else should be adjusted to mitigate the "NMI_Handler" Error

 

SDu T
Associate III

Good day

 

Is there anyone that can explain the strange situation described in my previous post?