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 Reply Children
  • 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.  

  • devtty said:
    It goes to the default within the switch statement instead.

     What is the value of the p_event->evt_type ?

    Also, you might find this post helpful:

    https://devzone.nordicsemi.com/f/nordic-q-a/62428/nrf52832-uart-overrun-issue-with-error-code-return-nrf_error_svc_handler_missing-from-ble_nus_data_send/254462#254462

  • I commented everything out within uart_event_handle and put " NRF_LOG_INFO("%u",  p_event->evt_type);" within the function. This results in the value "4" being printed 11 times 

  • On another note, I tried to implement the libUARTE instead but that is giving me troubles as well. I added the path to the library and made changes to the sdk_config.h  (including enabling NRFX_TIMER_ENABLED && NRFX_TIMER0_ENABLED ) but I receive these errors:

    I'm not sure what will be easier moving forward. Getting the regular UART working or libUARTE. Please let me know if I should just open a different ticket to move forward with libUARTE. Thanks!

  • Let's try to get the regular UART working first.

    This results in the value "4" being printed 11 times 

    4 is the same as APP_UART_DATA

    typedef enum
    {
        APP_UART_DATA_READY,          /**< An event indicating that UART data has been received. The data is available in the FIFO and can be fetched using @ref app_uart_get. */
        APP_UART_FIFO_ERROR,          /**< An error in the FIFO module used by the app_uart module has occured. The FIFO error code is stored in app_uart_evt_t.data.error_code field. */
        APP_UART_COMMUNICATION_ERROR, /**< An communication error has occured during reception. The error is stored in app_uart_evt_t.data.error_communication field. */
        APP_UART_TX_EMPTY,            /**< An event indicating that UART has completed transmission of all available data in the TX FIFO. */
        APP_UART_DATA,                /**< An event indicating that UART data has been received, and data is present in data field. This event is only used when no FIFO is configured. */
    } app_uart_evt_type_t;

    It indicats that you are not using the app_uart_fifo, but instead the non-FIFO app_uart.

    If you have app_uart.c in your project, then remove that, and use the app_uart_fifo.c instead

    If you still have issues after that, feel free to post your main.c file and/or your project.

Related