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

NRF52832 - UART/Serial Port Emulation over BLE

Hi,

I am using NRF52832 with SDK 15.2. In the example, UART/Serial Port Emulation over BLE. The documentation says that this example uses hardware flow control. Therefore, RTS and CTS PIn numbers are used as valid pin numbers and not 0xFFFFFFFFF. But the flow control parameter is assigned value APP_UART_FLOW_CONTROL_DISABLED. This is really confusing. Can someone clarify that why the RTS and CTS pins are not defined as UART_PIN_DISCONNECTED   0xFFFFFFFF if the flow control is disabled?

Initializing UART

The initialization of the application and the handling of data sent and received through BLE and UART are done in main.c.

The UART initialization is done as shown in the code below. The code segment uses the UART module that is provided in the SDK to perform the UART configuration. Note that app_uart_comm_params_t configures the application to use hardware flow control. Therefore, RTS_PIN_NUMBER and CTS_PIN_NUMBER are used as Ready-to-Send and Clear-to-Send pins, respectively.

static void uart_init(void)
{
uint32_t err_code;
app_uart_comm_params_t const comm_params =
{
.rx_pin_no = RX_PIN_NUMBER,
.tx_pin_no = TX_PIN_NUMBER,
.rts_pin_no = RTS_PIN_NUMBER,
.cts_pin_no = CTS_PIN_NUMBER,
.use_parity = false,
#if defined (UART_PRESENT)
#else
#endif
};
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_event_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
}
Thanks,
Jyoti
Related