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

UARTE HW Flowcontrol nRF52

Hello,

i am using the nRF52 Development Board with SDK 11 and I have trubble with the UARTE Interface with DMA. Parallel I have running the ESB protocol. I know the problems with UARTE and DMA and the FIFO. So I only use the nrf_drv_uarte.c that I can use the DMA without FIFO.

I connected my development board to the PC and have on the PC a virtual com port to receive data. But there is always a lack of data I received on my PC. I attempt to receive the data with HTerm and Realterm. Both leads to same results, that the whole data can received.

I decided to enable the Hardware Flowcontrol. But that changed nothing.

I enabled the flow control in nrf_config.h file and additionally in the config struct which I overgive nrf_drv_uart_init(&config, event_handler) as an input parameter.

nrf_drv_uart_config_t config = NRF_DRV_UART_DEFAULT_CONFIG;
config.baudrate = UART_BAUDRATE_BAUDRATE_Baud115200;
config.hwfc = NRF_UART_HWFC_ENABLED;
config.interrupt_priority = APP_IRQ_PRIORITY_LOW;
config.parity = false;
config.pselcts = CTS_PIN_NUMBER;
config.pselrts = RTS_PIN_NUMBER;
config.pselrxd = RX_PIN_NUMBER;
config.pseltxd = TX_PIN_NUMBER;
config.use_easy_dma = true;

Is there any configuration I missed? Or rather how I can detect whether Flow Control is working properly?

Thanks in advance,

Florian

Parents
  • I noticed some problems with the flow control when using nrf_drv_uart, but they where fixed when calling nrf_drv_uart_rx(rx_buffer,1) after nrf_drv_uart_init(&config, uart_event_handler). Without flow control it should work. For example like this:

    static uint8_t tx_buffer[13] = "hello world\n";
    nrf_drv_uart_tx(tx_buffer, 13);
    

    Does it work if you use app_uart_fifo instead?

Reply
  • I noticed some problems with the flow control when using nrf_drv_uart, but they where fixed when calling nrf_drv_uart_rx(rx_buffer,1) after nrf_drv_uart_init(&config, uart_event_handler). Without flow control it should work. For example like this:

    static uint8_t tx_buffer[13] = "hello world\n";
    nrf_drv_uart_tx(tx_buffer, 13);
    

    Does it work if you use app_uart_fifo instead?

Children
No Data
Related