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

NRF52 reboots constantly when I add UART

I am using the ble_app_uart example from SDK13 and something strange is happening. The code without UART part works nice and I can see in RTT that it can discover every beacon in the room and it seems it works perfectly. However, when I try to add UART part to the code, NRF52 becomes unstable and reboots constantly. RX pins are pulled up and also I don't send any information through serial but NRF52 begins to act strangely after adding the UART initialization. the code is attached.main.c Here is the RTT log ( I added simple NRF logs with numbers to find the problem as you can see in the code and RTT) rtt.jpg

  • Hi,

    You have removed the function db_discovery_init(), so when you later try to initialize the NUS Client module in nus_c_init(), you get the error code NRF_ERROR_INVALID_STATE because the Database Discovery Module is not initialized.'

  • Note that the reason why the device reboots is because you are running into the error handler(APP_ERROR_CHECK(err_code)) where the default behavior is to do a reset.

    When the device is constantly rebooting, you should debug in order to find the reason for the reset. See this post about debugging.

  • Hi.

    Have you checked uart_event_handle(...) ?

    Remove case clause for APP_UART_COMMUNICATION_ERROR, APP_UART_FIFO_ERROR

    Regards.