<?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 : Why BLE HCI UART implemented using Interrupt API than Asynchronous API</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103525/nrf52840-why-ble-hci-uart-implemented-using-interrupt-api-than-asynchronous-api</link><description>Hello Nordic Team, 
 
 The sample program BLE HCI UART implemented using interrupt API, which has limitation of 1 byte Rx per interrupt. 
 per document, Asynchronous API is recommend for UART, 
 https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Sep 2023 23:30:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103525/nrf52840-why-ble-hci-uart-implemented-using-interrupt-api-than-asynchronous-api" /><item><title>RE: nRF52840 : Why BLE HCI UART implemented using Interrupt API than Asynchronous API</title><link>https://devzone.nordicsemi.com/thread/445494?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 23:30:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c69959d8-b7c5-412d-85cf-6d32c470306a</guid><dc:creator>Alaganraj</dc:creator><description>&lt;p&gt;Thank you for the details Susheel. appreciate your support !&lt;/p&gt;
&lt;p&gt;just adding summary from S&lt;span&gt;cott Jeff&amp;nbsp;&lt;/span&gt;as well, it may help people in community.&lt;/p&gt;
&lt;div class="x_"&gt;&amp;quot; After creating the HCI UART project, I reviewed the HCI protocol. The protocol is primarily a single-word command protocol. However, I assume that data transfer can be of varying lengths. Hence your interest in EZ-DMA.&lt;/div&gt;
&lt;div class="x_"&gt;&amp;nbsp;I attempted to use the EZ-DMA for a UART application a few years ago. The issue I ran into was the EZ-DMA process leans itself well to block transfer of a fixed size. If the transfer data size is dynamic, you need additional timeout handlers to handle the case when the amount of transferred data isn&amp;rsquo;t enough to trigger the full buffer process. It&amp;rsquo;s not an impossible task, but unless there is a need to boost the UART interface&amp;rsquo;s throughput, a byte orientated transport is much easier and, in most cases, more efficient.&lt;/div&gt;
&lt;div class="x_"&gt;&amp;quot;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 : Why BLE HCI UART implemented using Interrupt API than Asynchronous API</title><link>https://devzone.nordicsemi.com/thread/445298?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 07:12:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82c7f56d-7f1f-43cb-9972-04cf0a02651c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It looks like the only reason they chose the &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__uart__polling.html"&gt;Polling UART API&amp;nbsp;&lt;/a&gt;&amp;nbsp;instead of &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__uart__async.html"&gt;Async UART API&lt;/a&gt;&amp;nbsp;is to keep the sample simple and still expose the functionality of the HCI UART.&lt;/p&gt;
&lt;p&gt;With Async UART API you need to know more about the details of the uart (callback/ TXRX buffers etc) than the simple use of poll.&lt;/p&gt;
&lt;p&gt;I agree that you can optimize this sample to use Async API. But that is the case for any sample where you have more than one option of API to choose from.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 : Why BLE HCI UART implemented using Interrupt API than Asynchronous API</title><link>https://devzone.nordicsemi.com/thread/445279?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 05:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:516a151f-d26c-488c-ab95-2dbe46be0f6e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I haven&amp;#39;t looked into the example deep enough to be able to answer that. Let me spend some time on it today and will try to answer you soon after that on why we used the interrupt mode for the BLE HCI UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>