This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Uart issue NRF_BREAKPOINT_CND

Hello All,

I am developing project which is based on nRF52840 and uses UART.

This my nRF52840 UART connect to STM's MCU UART.

If I do the connect Rx-Tx, Tx-Rx and VCC, GND then I power up the STM board my nRF code entering into below attached app_error_weak file.

Attached is the image and code.

Please help me what is the problem it very urgent for me.

uart _Exercise20210513.zip

Thanks and Regards

Rohit R

Parents Reply Children
  • Hi,

    Thanks for the response,

    I will go through these links and try the suggested method.

    also, one update from my end that, basically my end system is an HVAC system(Radiator with motor).

    This Radiator has 2 MCU, 1. STM8 and 2. nRF as RF module (developing now).

    1. STM8 is a base board with a motor connection and valve mounting on top. If I power up the Radiator it enters into preparation mode(motor spins once).

    2. nrf52840 is an RF module that uses Zigbee protocol to communicate with another Zigbee-based gateway and process the commands. (which exchange between nRF and STM via UART).

    3. So, it was observed that whenever I run the code first and then power on the Radiator during the preparation mode of Radiator I am facing this issue "NRF_BREAKPOINT_CND"

    4. And, If first power on the Radiator and after motor rotation stops (preparation mode stops) if we run the code on nRF I didn't face this mentioned issue. I am able to read response also.

    5. As of now, I am following step 4 to power and start the development as I have very little time.

    In the meantime, I will go through the steps shared by you to resolve this issue.

    One question,

    1. How to read/ write mutliple data into buffer in UART interrupt. If you have any small code please share. I tried the below snippet but for read operation it did not worked. I need this because for few command I get 10 bytes and in some case I get 125byte.  To map as per my requirement need into array buffer or some thing for state exchange. so please if you have any one then do share it will help me lot. I will attach whatever method I tried to execute write and read operation.

    Write operation , - Till now this is working,

      for(ui8TelegramIndex = 0; ui8TelegramIndex< sizeof(ui8GetFlagBuffer); ui8TelegramIndex++)
      {  
          while (app_uart_put(ui8GetFlagBuffer[ui8TelegramIndex]) != NRF_SUCCESS);  //send "Get_Bootloader" telegram to host device to read status
      }
    

    Read operation, - Stop at second while get statement,

        else if(p_event->evt_type == APP_UART_DATA_READY)
        {
          while(app_uart_get(&ui8GetBuffer[ui8Index])!= NRF_SUCCESS);   //after get flag read ACK and send EOC 
            if((ui8Rx ==RESP_ACK) && (boolACKIgnore == false))
            {
              boolACKIgnore = true;
              while(app_uart_put(EOC)!= NRF_SUCCESS);
            }
            //read command response from MCU
            //while(app_uart_get(&ui8Rx)!= NRF_SUCCESS);
            if(ui8Rx == SYNC)
            {
               while(app_uart_get(&ui8Rx)!= NRF_SUCCESS);
               ui8RxIndex = ui8Rx;
               for(ui8Index = 0; ui8Index< ui8RxIndex-2; ui8Index++)
               {
                  while(app_uart_get(&ui8Rx)!= NRF_SUCCESS);  //store data
                  ui8GetBuffer[ui8Index] = ui8Rx;
               }
               while(app_uart_put(RESP_ACK)!= NRF_SUCCESS);
            }
            //After data read from MCU check for EOC
           // while(app_uart_get(&ui8Rx)!= NRF_SUCCESS);
            if(ui8Rx ==EOC)
            {
              boolACKIgnore = false;
              while(app_uart_put(RESP_ACK)!= NRF_SUCCESS);
            }
        }

    Let me know your points,

    Urgent,

    Thanks and Regards

    Rohit R

  • The NRF_BREAKPOINT_CND means you've ended up in the Hard Fault Handler.

    This could well be due to an APP_ERROR_CHECK or similar.

    Various ways to track that down include

    Radiator with motor ... run the code first and then power on the Radiator during the preparation mode of Radiator I am facing this issue "NRF_BREAKPOINT_CND" ... If first power on the Radiator and after motor rotation stops (preparation mode stops) if we run the code on nRF I didn't face this mentioned issue. I am able to read response also

    all of those points suggest that you are likely to be in a noisy environment;  so you must be prepared to handle UART errors - not just throw a fatal error.

  • Hi,

    Okay, I will check.

    all of those points suggest that you are likely to be in a noisy environment;  so you must be prepared to handle UART errors - not just throw a fatal error.

    - Sorry, but didn't get the point clearly.

    Regards,

    Rohit

  • Hi,

    Yes, I was checking others and making changes to find.

    And, as I told in a previous post, that I am following other method of power and continue the work as of now. So, I am working on both to complete development as well as in between find a reason for the issue.

    It may take time to reach the result. Hope you understand. Slight smile

    And can you please share regarding UART multiple read/write data as I attached previously.

    Thanks and Regards

    Rohit R

Related