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

How to resolve the error " NRF_ERROR_NO_MEM " at the case APP_UART_COMMUNICATION_ERROR in uart_event_handle( ) ?

Dear all,

 I defined  "DEBUG" , used UART peripheral and "printf()" in the example "ble_app_uart" based nRF5_SDK_15.2.0_9412b96. I find nRF52832 always dead in the place at the case "APP_UART_COMMUNICATION_ERROR" in "uart_event_handle( )" when I do not use any device to receive nRF52832's uart data in the power up. But when I use one device to receive nRF52832's uart data, the nRF52832 can run successfully in the power up. The follow are my debug output informations.

How can I resolve this problem ? Because I do not want my nRF52832 will dead at some time when I do not receive it's uart data.

I hope the nRF52832's UART can transmit data normally no matter there is device to receive it's uart data.

Parents
  • Here's what I did:

            /**@snippet [Handling data from UART] */
            case APP_UART_COMMUNICATION_ERROR:
                NRF_LOG_ERROR("Communication error occurred while handling UART: %08X", p_event->data.error_communication );
                if( p_event->data.error_communication & UART_ERRORSRC_BREAK_Msk )
                {
                    NRF_LOG_ERROR("   Break");
                }
                if( p_event->data.error_communication & UART_ERRORSRC_FRAMING_Msk )
                {
                    NRF_LOG_ERROR("   Framing");
                }
                if( p_event->data.error_communication & UART_ERRORSRC_PARITY_Msk )
                {
                    NRF_LOG_ERROR("   Parity");
                }
                if( p_event->data.error_communication & UART_ERRORSRC_OVERRUN_Msk )
                {
                    NRF_LOG_ERROR("   Overrun");
                }
                
                // ### Ignore: APP_ERROR_HANDLER(p_event->data.error_communication);
                break;
    

    Note that you really don't want to call APP_ERROR_HANDLER on this kind of error!!

Reply
  • Here's what I did:

            /**@snippet [Handling data from UART] */
            case APP_UART_COMMUNICATION_ERROR:
                NRF_LOG_ERROR("Communication error occurred while handling UART: %08X", p_event->data.error_communication );
                if( p_event->data.error_communication & UART_ERRORSRC_BREAK_Msk )
                {
                    NRF_LOG_ERROR("   Break");
                }
                if( p_event->data.error_communication & UART_ERRORSRC_FRAMING_Msk )
                {
                    NRF_LOG_ERROR("   Framing");
                }
                if( p_event->data.error_communication & UART_ERRORSRC_PARITY_Msk )
                {
                    NRF_LOG_ERROR("   Parity");
                }
                if( p_event->data.error_communication & UART_ERRORSRC_OVERRUN_Msk )
                {
                    NRF_LOG_ERROR("   Overrun");
                }
                
                // ### Ignore: APP_ERROR_HANDLER(p_event->data.error_communication);
                break;
    

    Note that you really don't want to call APP_ERROR_HANDLER on this kind of error!!

Children
No Data
Related