Skip to main content
SDu T
Associate III
June 10, 2024
Question

Nx_Iperf NMI_Handler Error

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)

    This topic has been closed for replies.

    5 replies

    Pavel A.
    June 11, 2024

    > 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.

    SDu T
    SDu TAuthor
    Associate III
    June 11, 2024

    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
    SDu TAuthor
    Associate III
    June 11, 2024

    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
    SDu TAuthor
    Associate III
    June 18, 2024

    Good day

     

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