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

UART communication with Arduino ERROR 1 [NRF_ERROR_SVC_HANDLER_MISSING]

I am able to successfully run the UART peripheral example and view data sent via uart from an arduino to the nrf. Now I am trying to use it with the nrf BLE relay example. However, either nothing gets outputted or I get the error ERROR 1 [NRF_ERROR_SVC_HANDLER_MISSING].

Here is the uart_evt handler with the line generating the error highlighted.

Here is the uart_init code. When I uncomment the code at the bottom I can actually see the data printed via uart. It just doesnt work with the event handler and errors out in it. Any help would be great. Thanks!

Also I am building off the example found at:

https://github.com/NordicPlayground/nrf52-ble-app-uart-relay

Thanks again.

Parents
  • Hi,

    If the error is coming from here:

            case APP_UART_COMMUNICATION_ERROR:
                APP_ERROR_HANDLER(p_event->data.error_communication);
                break;

    Then it's likely ERRORSRC with value set to 1, indicating that the UART is overrun.

    Overrun error

    A start bit is received while the previous data still lies in RXD. (Previous data is lost.)

    If possible, you should enable flow-control.

  • Unfortunately I cannot use flow-control. I increased the priority of the UART IRQ and the error is not being as persistent. further trouble shooting is leading me to believe  APP_UART_DATA_READY is not being generated. I put simple print statements in the uart_event_handle and I never get inside the "case:  APP_UART_DATA_READY". It goes to the default within the switch statement instead. I send "Hello World" via uart and uart_event_handle is called 11 times (once for each character) but as mentioned APP_UART_DATA_READY is never reached. Do I need to transmit something special via uart to trigger the APP_UART_DATA_READY? From what I read APP_UART_DATA_READY should be generated each time a byte is received.  

Reply
  • Unfortunately I cannot use flow-control. I increased the priority of the UART IRQ and the error is not being as persistent. further trouble shooting is leading me to believe  APP_UART_DATA_READY is not being generated. I put simple print statements in the uart_event_handle and I never get inside the "case:  APP_UART_DATA_READY". It goes to the default within the switch statement instead. I send "Hello World" via uart and uart_event_handle is called 11 times (once for each character) but as mentioned APP_UART_DATA_READY is never reached. Do I need to transmit something special via uart to trigger the APP_UART_DATA_READY? From what I read APP_UART_DATA_READY should be generated each time a byte is received.  

Children
Related