<?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 DMA confusion</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119483/uart-dma-confusion</link><description>Hi, 
 I&amp;#39;m working with UART with DMA(UARTE) on nRF52840. UART does not have HW flow control, just RX-TX. 
 I&amp;#39;m confused with DMA part. Is DMA circular or I have to reset it back to 0? How I can get DMA byte index? 
 Until now I used DMA in circular mode</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Mar 2025 08:37:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119483/uart-dma-confusion" /><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525883?ContentTypeID=1</link><pubDate>Wed, 05 Mar 2025 08:37:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e33eabb-d5c1-427f-8ffb-e0313c0ce78f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Silvio,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have further information, just want to drop a link to a similar ticket here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33813/nrf58232-uarte-rx-easydma-pointer"&gt;nRF58232 UARTE RX EasyDMA Pointer&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s quite old but still relevant I think.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525588?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 18:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df5101bf-db73-479a-b7a6-825148472206</guid><dc:creator>silvio3105</dc:creator><description>&lt;p&gt;Not possible. GSM modem uses only UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525580?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 16:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48bdbd27-e313-47fd-ad0e-13ffb86437e0</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;It&amp;#39;s pretty limited. An alternative, should you have control over both ends of the link, is to switch to SPIM. Hardware flow control via an input pin can be implemented using TASKS_SUSPEND and TASKS_RESUME coupled via PPI to the rising and falling edge of the input pin. I wrote an example&amp;nbsp;using 2 x PPI at the end of the post&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/117144/how-to-do-spim-with-handshakes"&gt;how-to-do-spim-with-handshakes&lt;/a&gt;&amp;nbsp;based on&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel&amp;#39;s&lt;/a&gt; toggle suggestion&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525577?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 16:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b253767-2ec9-4748-99bf-9fb4b4fe5ca6</guid><dc:creator>silvio3105</dc:creator><description>&lt;p&gt;Damn. Yes, I can count RX bytes via RXDRDY event but without HW flow control SD can cause counter to skip and desync counter with actual buffer.&lt;br /&gt;Communication is with GSM modem. With all URCs, this DMA design is really bad.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525576?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 16:30:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84c8a7f5-b044-412d-bba5-1733d5d94e9a</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;There isn&amp;#39;t a register which allows reading of the current DMA data pointer, but there is an implicit event which can be used to trigger a counter for bytes actually sent. It&amp;#39;s a bit clumsy, as the DMA is really designed for discreet packets of data,&amp;nbsp;such packets can be variable length but are expected to be sent individually, though packet n+1 can be started before packet n completes as the Tx ptr is double-buffered. Using discrete packets and checking TXD.AMOUNT (Number of bytes transferred in the last transaction) allows manipulating a circular buffer, but unless the packets exactly align with the end of the circular buffer the next packet would be started at the beginning of the buffer and not at the end of the previous packet in the buffer. Ideally all packets are size N bytes and then the buffer can be some integer * N in size and an index of packets allows simple update of TXD.PTR.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;em&gt;After each byte has been sent over the TXD line, a TXDRDY event will be generated&lt;/em&gt;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525565?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 15:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c0167d8-9c6d-4760-afa5-c8ac84ca6309</guid><dc:creator>silvio3105</dc:creator><description>&lt;p&gt;I care because I don&amp;#39;t want and like to use something without knowing how it works. I use nrfx hal. I forgot to say I use nRF5 SDK.&lt;br /&gt;This is not about SDK, it&amp;#39;s about how UARTE works on HW level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART DMA confusion</title><link>https://devzone.nordicsemi.com/thread/525540?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 14:16:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20207e51-5003-43c5-aa8d-5f2643323018</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Why do yo care? The NRF connect SDK ships with ready-to-use UART drivers.&lt;/p&gt;
&lt;p&gt;HW flow control is strongly recommended once baud rate exceeds roughly 9600 baud due to how BTLE works (it can block the CPU for a while).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>