<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF52840 flow control</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/31188/nrf52840-flow-control</link><description>Is it possible to communicate between 2 Nordic kits at 1 M baud without HW flow control? I came across this post in the forum which states that bytes can be missed when switching from primary RAM buffer to secondary RAM buffer if flow control is not enabled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Mar 2018 09:51:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/31188/nrf52840-flow-control" /><item><title>RE: nRF52840 flow control</title><link>https://devzone.nordicsemi.com/thread/123386?ContentTypeID=1</link><pubDate>Thu, 08 Mar 2018 09:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:157273cd-fb93-4a97-9f3a-086592db114c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;How about just supplying a large fixed buffer, e.g. 512bytes, and then the application may just read the RAM location directly? Of course the application then would possible need to handle the case that some bytes in a response may be written at the end of the buffer and continue at the start of the buffer (because the messages likely won&amp;#39;t fit exactly in the 512bytes), but I don&amp;#39;t expect that is a big problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 flow control</title><link>https://devzone.nordicsemi.com/thread/123325?ContentTypeID=1</link><pubDate>Wed, 07 Mar 2018 21:17:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd3110b0-d4ee-4089-9d80-a41017d43ebe</guid><dc:creator>KV</dc:creator><description>&lt;p&gt;Thanks for the response. This was very helpful. So my application is command/response communication scheme between master and slave. Size of response depends on the command sent. So would the sequence of TX/RX using the APIs would be as below.&amp;nbsp; I had to call the rx_abort between one TX and the next. Otherwise, the size of buffers gets out of sync.&lt;pre class="ui-code" data-mode="text"&gt;uint8_t rx_byte[256];
while(1)
{
	// Command 1 (8 byte), Resp 1 (16 bytes)
	while(NRF_SUCCESS != nrf_drv_uart_tx(&amp;amp;app_uart_inst, command_1, 8) );   
	while( NRF_ERROR_BUSY != nrf_drv_uart_rx(&amp;amp;app_uart_inst, rx_byte, 16));
	while( NRF_ERROR_BUSY != nrf_drv_uart_rx(&amp;amp;app_uart_inst, rx_byte, 16));
	if(err_code != NRF_ERROR_BUSY)
	{
		APP_ERROR_CHECK(err_code);
	}       

	nrf_delay_ms(300);

	nrf_drv_uart_rx_abort(&amp;amp;app_uart_inst); // generates a RXDONE event - ignore
	
	// Command 2 (4 byte), Resp 1 (128 bytes)
	while(NRF_SUCCESS != nrf_drv_uart_tx(&amp;amp;app_uart_inst, command_2, 4) );   
	while( NRF_ERROR_BUSY != nrf_drv_uart_rx(&amp;amp;app_uart_inst, rx_byte, 128));
	while( NRF_ERROR_BUSY != nrf_drv_uart_rx(&amp;amp;app_uart_inst, rx_byte, 128));
	if(err_code != NRF_ERROR_BUSY)
	{
		APP_ERROR_CHECK(err_code);
	}       

	nrf_delay_ms(300);

	nrf_drv_uart_rx_abort(&amp;amp;app_uart_inst); // generates a RXDONE event - ignore
			
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 flow control</title><link>https://devzone.nordicsemi.com/thread/123299?ContentTypeID=1</link><pubDate>Wed, 07 Mar 2018 15:56:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbe56b5a-e19d-42fb-83d1-0e71931455f9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi, if you enable EasyDMA (sdk_config.h) and use the driver directly you should be able to do this without loosing any data. I recommend to always call&amp;nbsp;nrf_drv_uart_rx() until&amp;nbsp;NRF_ERROR_BUSY, this way you ensure the secondary buffer is always ready to receive data when the first is full. Also you should set the buffer length to more than 1, e.g. &amp;gt;10.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>