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

Problems with initializing the UART (Error code 0x08)

Hi,

I tried to implement the UART in my code, based on the UART example code. Just as in the example, I first define the struct with the pin numbers:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
UART_HWFC,
false,
#if defined (UART_PRESENT)
NRF_UART_BAUDRATE_115200
#else
NRF_UARTE_BAUDRATE_115200
#endif
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The pins in this struct are after initialization: 8, 6, 5 and 7 (respectively) just as in the example code. After initializing the rest of my peripherals, I try to initialize the UART (with FIFO):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Initialize.
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
adc_configure();
gap_params_init();
gatt_init();
advertising_init();
db_discovery_init();
services_init();
conn_params_init();
peer_manager_init();
get_dev_addr();
/* nach diesem Befehl ist err_code = 0x08 */
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_error_handle,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But this command returns the error code 0x08. When I debug at the "APP_UART_FIFO_INIT" command and step into the command app_uart_init, the values of comm_params have really fancy values as shown in the picture below.

I assume this might have something to do with the error?

I've already seen some similar issues that other people had. When I turn off the nRF_Log, it still does not work.

Thank you kindly for your help.