Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

libUARTE (SDK15.3) HWFC does not look fully supported.

Hi, 
I'm trying to implement UART interface with HW flow control on nRF52832. After some investigation I found libUARTE is the most advanced option.

During testing I found that RTS/CTS lines are always active (low) even at high data load. So I suspected wrong HW flow control operation.    
PS says: 
"If HW flow control is enabled the RTS signal will be deactivated when the receiver is stopped via the STOPRX task or when the UARTE is only able to receive four more bytes in its internal RX FIFO." 
For first case I found only 

nrf_libuarte_rx_stop();
that implemented in nrf_libuarte.c but never called. 
For second case libUARTE has double buffering so it handled i think. 

My question is: How to prevent host from sending any data in case when nordic application stop consuming received data (and stop calling nrf_libuarte_async_rx_free())? This can happen when peer send request that need to be processed on Nordic in time longer than 3*MTU_SIZE/baudrate. I suggest deactivating CTS once rx buffers are full and activate it again once buffers are free.  

Thanks

Related