Hi,
I'm using the 3rd generation of nRF51822 with S110 v8.0.0 and the SDK 10.0. In my application i'm using the uart core to communicate with the external device. I'm using the following code to initialize the UART core
void UART_INIT (void)
{
uint32_t err_code;
const app_uart_comm_params_t comm_params =
{
UART_RX_PIN_NUMBER,
UART_TX_PIN_NUMBER,
0,
0,
APP_UART_FLOW_CONTROL_DISABLED,
false,
UART_BAUDRATE_BAUDRATE_Baud57600
};
APP_UART_FIFO_INIT( &comm_params,
UART_RX_BUFFER_SIZE,
UART_TX_BUFFER_SIZE,
uart_event_handle,
APP_IRQ_PRIORITY_LOW,
err_code);
APP_ERROR_CHECK(err_code);
}
The application works for a while (send and receive successfully) and suddenly it trigger the app_error_handler
function.
The app_error_handler
indicate that the error comes from nrf_drv_uart.c
in line 0x100
.
When i check the line 0x100
i see that the
ASSERT(m_cb.state == NRF_DRV_STATE_INITIALIZED);
line is causing the problem. i debug the program and noticed that the value of m_cb.state
is 0x54
at the time that error is occurred.
I have no idea how to solve the problem.
Please let me know if any more information you need to assist me to solve the problem.