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

blinky_freertos example adds Serial UART but nrf_serial_init() fail

SDK version: nRF5_SDK_15.3.0

Platform: nRF52840 DK

SoftDevice: s140

--

Hi All,

I use blinky_freertos example to add nrf_serial lib to send/receive AT command by UART port.

It's work when I press "build and run" on SES IDE, 

bit if I switch the power key on nRF52840DK, it's didn't work.

I try to trace to find that nrf_serial_init() call nrf_queue_reset() and the nrf_queue_reset() can not return.

I don't know why.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
NRF_SERIAL_UART_DEF(serial1_uarte, 1);
NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config,
ARDUINO_0_PIN, ARDUINO_1_PIN,
RTS_PIN_NUMBER, CTS_PIN_NUMBER,
NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
NRF_UART_BAUDRATE_115200,
UART_DEFAULT_CONFIG_IRQ_PRIORITY);
NRF_SERIAL_CONFIG_DEF(serial1_config, NRF_SERIAL_MODE_DMA,
&serial1_queues, &serial1_buffs, NULL, sleep_handler);
static 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

BTW, this example I use app_timer(RTC1) and FreeRTOS timer(RTC2)

Thanks.

Tim