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

SVC HANDLER MISSING Error with APP UART

Hi all,

I am communicating with a sensor through UART using APP_UART on a custom board (nrf52840) through the nrf52 DK. I can send and receive commands to and from the sensor, however, it randomly resets. It throws the error 1 (SVC Handler is Missing). I'm using the app_uart_put() and app_uart_get() functions and it resets when I use both or only one function. If those functions aren't in use, the program works fine and doesn't reset. Additionally, using a loopback with the same functions does not cause a reset.

I've also disabled the watchdog.

I am using the NRF5 15.2 SDK with S140 SD 6.1

Please advice, thank you.

Parents
  • Hi,

    I suspect the error is coming from the APP_UART_COMMUNICATION_ERROR event, can you confirm this? If that's the case, you are actually getting an OVERRUN error from the UART peripheral, which is not related to the error written in the debug log. 

  • It seems like I've managed to find a solution for this.

    I commented out the error handler for the APP_UART_COMMUNICATION_ERROR and instead have temporarily just printed out a log saying this error occurred.

    I also changed the IRQ Priority from lowest (default) to highest in the UART initialization. With these two changes, I would only get the APP_UART_COMMUNICATION_ERROR after 30s from start up.

    Lastly, I flushed the RX and TX buffers whenever it would enter an error condition, and at the end of receiving all the bytes (in my case 10). This eliminated all the APP_UART_COMMUNICATION_ERRORs. 

    Thanks for the help!

Reply
  • It seems like I've managed to find a solution for this.

    I commented out the error handler for the APP_UART_COMMUNICATION_ERROR and instead have temporarily just printed out a log saying this error occurred.

    I also changed the IRQ Priority from lowest (default) to highest in the UART initialization. With these two changes, I would only get the APP_UART_COMMUNICATION_ERROR after 30s from start up.

    Lastly, I flushed the RX and TX buffers whenever it would enter an error condition, and at the end of receiving all the bytes (in my case 10). This eliminated all the APP_UART_COMMUNICATION_ERRORs. 

    Thanks for the help!

Children
No Data
Related