<?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>how to use async uart api with hardware flow control on zephyr 3.2 with nrf52840?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112704/how-to-use-async-uart-api-with-hardware-flow-control-on-zephyr-3-2-with-nrf52840</link><description>Hi, 
 we have got some async uart api application running with zephyr 3.2 on nrf52840. 
 This worked fairly well until there have been added some file-write operations to the application, which are causing so much delay, that the application is not able</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Jul 2024 15:47:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112704/how-to-use-async-uart-api-with-hardware-flow-control-on-zephyr-3-2-with-nrf52840" /><item><title>RE: how to use async uart api with hardware flow control on zephyr 3.2 with nrf52840?</title><link>https://devzone.nordicsemi.com/thread/492111?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2024 15:47:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03ab5b14-8d4f-4e27-8316-e33bcd8cacd3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Yes, your understanding is correct.&lt;/p&gt;
[quote user="Volker"]I studied the documentation about the async uart events carefully before, but there is no hint about what happens with the hardware flow control.[/quote]
&lt;p&gt;I would suggest&amp;nbsp;&lt;span&gt;contact&amp;nbsp;&lt;a href="https://discord.com/invite/zephyr-888818750588092488"&gt;ZEPHYR Discord&lt;/a&gt;&amp;nbsp;for &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/hardware/peripherals/uart.html#asynchronous_api"&gt;Zephyr UART API&lt;/a&gt;&amp;nbsp;with your requirements.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use async uart api with hardware flow control on zephyr 3.2 with nrf52840?</title><link>https://devzone.nordicsemi.com/thread/492098?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2024 14:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d0fb815-8931-4da8-b22a-1aa950da7937</guid><dc:creator>Volker</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;thank you for your reply. We are currently using zephyr, but are within the decision process to switch over to NCS.&lt;/p&gt;
&lt;p&gt;I studied the documentation about the async uart events carefully before, but there is no hint about what happens with the hardware flow control.&lt;/p&gt;
&lt;p&gt;Is my understanding correct that stopping the providing of new buffers is the intended way of forcing the driver to use the hardware-flow control lines to tell the transmitter to stop transmitting?&lt;/p&gt;
&lt;p&gt;This will then finally lead to a disabling of the uart interface.&lt;/p&gt;
&lt;p&gt;As soon as the application thread has processed a reasonable large amount of the queued data, the uart might then be re-enabled again to tell the driver to use the hardware-flow-control lines to tell the transmitter to continue transmitting?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Volker&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use async uart api with hardware flow control on zephyr 3.2 with nrf52840?</title><link>https://devzone.nordicsemi.com/thread/492084?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2024 13:35:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d2a203f-4d46-4023-8b95-698af9904201</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]we have got some async uart api application running with zephyr 3.2 on nrf52840.[/quote]
&lt;p&gt;Are you using&amp;nbsp;vanilla Zephyr or NCS? If NCS, which version? Please be aware that our support is based on NCS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The flow control is typically set during the UART initialization and managed by the hardware/driver afterward, so there isn&amp;#39;t a direct method to manually activate or deactivate hardware flow control during runtime in the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/hardware/peripherals/uart.html#asynchronous_api"&gt;Zephyr UART API&lt;/a&gt;.&amp;nbsp; However, you can control the flow of data by managing the buffers provided to the UART driver. If you stop providing buffers to the driver, it will stop receiving data and generate a UART_RX_DISABLED event. This could effectively tell the sender to stop transmitting. Here&amp;#39;s an excerpt from the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/hardware/peripherals/uart.html#asynchronous_api"&gt;Zephyr UART API&lt;/a&gt; documentation that explains this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If there was second buffer provided, it will become current buffer and we start again at point 2. If no second buffer was specified receiving is stopped and UART_RX_DISABLED event is generated. After that whole process can be repeated. &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Any time during reception UART_RX_STOPPED event can occur. if there is any data received, UART_RX_RDY event will be generated. It will be followed by UART_RX_BUF_RELEASED event for every buffer currently passed to driver and finally by UART_RX_DISABLED event.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are using the&amp;nbsp;&lt;span&gt;vanilla Zephyr and the above cannot help, please contact &lt;a href="https://discord.com/invite/zephyr-888818750588092488"&gt;ZEPHYR Discord&lt;/a&gt;&lt;/span&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>