<?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>UART  API types and use</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83762/uart-api-types-and-use</link><description>I had a look on APIs to use UART in Zephyr in the link https://docs.zephyrproject.org/latest/reference/peripherals/uart.html#uart-interrupt-api . There are three types: Poll, Interrupt and Asynchronous using DMA. 1. In what situation which mode is prefrerd</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jan 2022 14:25:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83762/uart-api-types-and-use" /><item><title>RE: UART  API types and use</title><link>https://devzone.nordicsemi.com/thread/348319?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 14:25:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:741035a4-a901-41df-8af4-9a8855b4cd24</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]1. In what situation which mode is prefrerd.[/quote]
&lt;p&gt;It depends on what benefit you want. See the explanation in this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/78244/uart-i2c-twi-communication-with-polling-interrupt-dma-method-different-brief-explained-guide"&gt;post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]2. May, some one give an example of each?[/quote]
&lt;p&gt;&lt;span&gt;&amp;nbsp;Poll (default):&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/peripheral/lpuart/README.html"&gt;Low Power UART&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Interrupt-based UART: &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/getting-started/posts/nus-on-ncs-the-nordic-uart-service-with-the-nrf-connect-sdk"&gt;NUS on NCS: The Nordic UART Service with the nRF Connect SDK&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/bluetooth/hci_lpuart/README.html"&gt;HCI low power UART&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Asynchronous using DMA:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/bluetooth/peripheral_uart/README.html"&gt;Bluetooth: Peripheral UART&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]3. Is it mondatory to use Semphore in Asynchronous mode ?&amp;nbsp;[/quote]
&lt;p&gt;&lt;span&gt;No, Semaphore is not used in&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/bluetooth/peripheral_uart/README.html"&gt;Bluetooth: Peripheral UART&lt;/a&gt;&amp;nbsp;sample.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>