<?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, i2c/twi communication with polling, interrupt, DMA method different brief explained guide</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78244/uart-i2c-twi-communication-with-polling-interrupt-dma-method-different-brief-explained-guide</link><description>Hello, 
 i have searched for uart, i2c/twi communication with polling, interrupt, DMA method different brief explained guide for NRF52 
 but i have not found it any where plz suggest me a good guide for the same....or share me examples for different methods</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Aug 2021 14:03:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78244/uart-i2c-twi-communication-with-polling-interrupt-dma-method-different-brief-explained-guide" /><item><title>RE: uart, i2c/twi communication with polling, interrupt, DMA method different brief explained guide</title><link>https://devzone.nordicsemi.com/thread/323571?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 14:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7a9db21-fa20-47e8-836a-2d267d0103cc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Polling means that the CPU needs to constantly/regularly read the EVENT registers in the peripheral, to see if a TASK has completed. Polling mode is often implemented in the drivers as&amp;nbsp;&lt;a title="Blocking mode" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/hardware_driver_uart.html?cp=8_1_2_0_19_1_0#uart_blocking"&gt;Blocking mode&lt;/a&gt;. With interrupts, the peripheral will automatically trigger an interrupt handler in the driver/application when an EVENT occurs. In interrupt mode, the CPU can sleep while waiting for events, which will save power. Interrupt mode is often implemented in the drivers as &lt;a title="Non-blocking mode" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/hardware_driver_uart.html?cp=8_1_2_0_19_1_1#uart_nonblocking"&gt;Non-blocking mode&lt;/a&gt;. See&amp;nbsp;&lt;a title="Peripheral interface" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/peripheral_interface.html?cp=4_2_0_14#concept_twz_bpz_vr"&gt;Peripheral interface&lt;/a&gt;&amp;nbsp;for more details around these HW concepts.&lt;/p&gt;
&lt;p&gt;DMA is used by the peripherals to read/write data directly to/from RAM during transfers, to allow the CPU to sleep. This is described in more details in the&amp;nbsp;&lt;a title="EasyDMA" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/easydma.html?cp=4_2_0_9#easydma"&gt;EasyDMA&lt;/a&gt;&amp;nbsp;chapter. Only peripherals with EasyDMA support (UARTE, TWIM, TWIS, SPIM, SPIS) can use DMA. Other peripherals (UART, TWI, SPI) will have to provide the data for each byte that will be transferred, which will wake CPU much more often than when EasyDMA is used.&lt;/p&gt;
&lt;p&gt;nrf_serial library is deprecated and removed in SDK 17.0.0, but should be available and working for earlier SDK versions. In SDK 17.0.x, it is recommended to use libUARTE library.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>