<?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>UARTE with HW flow control RTS stays high</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101325/uarte-with-hw-flow-control-rts-stays-high</link><description>Hello, 
 I am trying to test hardware flow control with UARTE1, with 115200 bps TX/RX is working fine with RTS/CTS always stay low(active). To prove flow control is working(that RTS can be used to stop other side sending) I tried to add delay in the UART</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Jun 2023 07:49:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101325/uarte-with-hw-flow-control-rts-stays-high" /><item><title>RE: UARTE with HW flow control RTS stays high</title><link>https://devzone.nordicsemi.com/thread/433852?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 07:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d0558d2-b8fb-4093-97e8-a2bc416b2729</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Ray Ma"]The setup is to receive ~100 bytes, I tried manually sending from the other side but it&amp;#39;s blocked b/c CTS(Nrf RTS) is high.[/quote]
&lt;p&gt;How many bytes do you set to receive?&lt;/p&gt;
&lt;p&gt;You mention that your code is similar to the snippet, but that snippet is effectively from app_uart_fifo.c.&lt;/p&gt;
&lt;p&gt;app_uart_fifo will setup RX on one byte, and if you know how many bytes you will receive each time, I would strongly recommend that you use the nrfx_uarte directly instead, to get better control over the transport (ie. set the RXD DMA length).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If your application sets up one byte RX via&amp;nbsp;nrf_drv_uart_rx(...), then it is approx. 22 us per byte in 460k8 baud, which will cause a timing error.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE with HW flow control RTS stays high</title><link>https://devzone.nordicsemi.com/thread/433767?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 16:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:199e8e8e-2cf2-4648-b1be-dc7591081d9e</guid><dc:creator>Ray Ma</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;The setup is to receive ~100 bytes, I tried manually sending from the other side but it&amp;#39;s blocked b/c CTS(Nrf RTS) is high.&lt;/p&gt;
&lt;p&gt;I added 20us in the UART ISR to slow down the RX path and this also happens when I tune up the UART bps to&amp;nbsp;&lt;span&gt;460800. It seems like I am only getting the ISR event for the first two bytes, is the ISR triggered per byte received?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Rui&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE with HW flow control RTS stays high</title><link>https://devzone.nordicsemi.com/thread/433744?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 14:58:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a20a0a33-865e-4341-81dd-a99f244ccfe9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""] I tried to add delay in the UART ISR event handler to slow down the receiving, what I see now is that RTS stuck in high, from device log I see in SW we only received 2bytes, from logic analyzer I see there were 5 bytes transferred before RTS goes high. RTS never goes back low after this so RX is broken, any idea why this is happening? [/quote]
&lt;p&gt;How many bytes are setup to receive?&lt;/p&gt;
&lt;p&gt;How long is the delay that you&amp;#39;ve added? The _ENDRX event is cleared before the callback handler is called in the driver itself, so I would assume that you get the callback twice.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>