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

NRF52810 can't initialize app_uart ( ERROR 8 [NRF_ERROR_INVALID_STATE])

Hi,

I'm developing a project which use softdevice and some peripherals together. I want to use serial communication with uart. But i couldn't initialize the app_uart module.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void uart_error_handle(app_uart_evt_t * p_event)
{
if (p_event->evt_type == APP_UART_COMMUNICATION_ERROR)
{
APP_ERROR_HANDLER(p_event->data.error_communication);
}
else if (p_event->evt_type == APP_UART_FIFO_ERROR)
{
APP_ERROR_HANDLER(p_event->data.error_code);
}
}
void uart_init(void)
{
uint32_t err_code;
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

app_uart_init function return "ERROR 8 [NRF_ERROR_INVALID_STATE]" error. I tried nrff_serial library a few days ago and i got same error also.

What does this error mean? I compiled app_uart example on my custom board and it worked  fine. I did everything same in my custom board but i couldn't make it.