<?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>issues using DMA with nrf9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50873/issues-using-dma-with-nrf9160</link><description>hi all, i am using the uart with it&amp;#39;s dma to transfer data into the nrf9160, but some of the data is lost in it&amp;#39;s way. here are some examples of the loss count in bytes from different transfers (58 bytes lost in the first transfer): 
 payload.size = 6484</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Aug 2019 11:52:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50873/issues-using-dma-with-nrf9160" /><item><title>RE: issues using DMA with nrf9160</title><link>https://devzone.nordicsemi.com/thread/203809?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 11:52:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88d34f42-43e1-4dab-ad3a-f02ce2f91490</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to enable DMA reception, with a given chunk size, you have to pass this to the uart_rx_enable function.&lt;/p&gt;
&lt;p&gt;This means that all your data will be received in this chunk, as shown here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/drivers/uart/uart_async_api/src/test_uart_async.c#L56"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/drivers/uart/uart_async_api/src/test_uart_async.c#L56&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the RXD DMA size you expect to receive?&lt;/p&gt;
&lt;p&gt;How does your received data look compared to the sent data?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issues using DMA with nrf9160</title><link>https://devzone.nordicsemi.com/thread/203765?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 09:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40a9883c-9f13-410a-bd9e-b42b27ba8671</guid><dc:creator>MosheSmartAmr</dc:creator><description>&lt;p&gt;HI,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. CTS/RTS is not used.&lt;/p&gt;
&lt;p&gt;2. The buffers are statically allocated&lt;/p&gt;
&lt;p&gt;3. I doubt that corrupt data is the case, we always memset all buffers to zero. also when not using DMA it works perfectly.&lt;/p&gt;
&lt;p&gt;4.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        memset(ubuf_image,0, sizeof(ubuf_image));
        uart_wifi = device_get_binding(DT_UART_1_NAME);
        if (!uart_wifi) {
                printk(&amp;quot;error\r\n&amp;quot;);
        }
        printk(&amp;quot;ubuf_image=[0x%x]\n&amp;quot;, ubuf_image);
#ifndef UART_DMA
        uart_irq_rx_enable(uart_wifi );
        printk(&amp;quot;uart_irq_rx_enable() done\n&amp;quot;);
        uart_irq_callback_set(uart_wifi , uart_cb);
#else
        uart_callback_set(uart_wifi, uart_callback_algo, uart_wifi);
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issues using DMA with nrf9160</title><link>https://devzone.nordicsemi.com/thread/203599?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 12:58:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4ceba56-51dc-4853-a333-381432ef06e9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using CTS/RTS?&lt;/p&gt;
&lt;p&gt;Are your buffers statically defined (ie: not malloc/calloc&amp;#39;ed)?&lt;/p&gt;
&lt;p&gt;strlen() will parse output until it hits zero termination, could it be that the data has been corrupted, and zero chars is present in the buffer?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you show a code snippet on how you setup the UART?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>