<?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>Increase double buffer size for async UART caused EACCES</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111791/increase-double-buffer-size-for-async-uart-caused-eacces</link><description>Hi, 
 
 I&amp;#39;m trying to increase the UART buffer size for the asynchronous UART API, but I&amp;#39;m encountering an error. When the message size is set to 255, I can successfully receive data from my GPS sensor. However, when I increase the message size to 512</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jun 2024 02:48:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111791/increase-double-buffer-size-for-async-uart-caused-eacces" /><item><title>RE: Increase double buffer size for async UART caused EACCES</title><link>https://devzone.nordicsemi.com/thread/487405?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2024 02:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc184d66-9adf-488c-8e93-7ae45db4f8fa</guid><dc:creator>kcl</dc:creator><description>&lt;p&gt;&lt;span&gt;Thanks for the suggestions! That&amp;#39;s all the information I needed. I&amp;#39;ll explore the options you mentioned and see what works best for my situation.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase double buffer size for async UART caused EACCES</title><link>https://devzone.nordicsemi.com/thread/487259?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 09:59:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:daef8bd2-6f5d-4dc3-b1c7-ad3be67941c5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think it should be possible to reliably receive the data without flow control if you utilize double buffering.&amp;nbsp;You should also enable the HW counter for byte counting:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/26fd55e0a750305fbd5d9db750225d7e707458ae/drivers/serial/Kconfig.nrfx_uart_instance#L45"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/26fd55e0a750305fbd5d9db750225d7e707458ae/drivers/serial/Kconfig.nrfx_uart_instance#L45&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;e.g., CONFIG_UART_0_NRF_HW_ASYNC_TIMER=1 // Use TIMER1 for byte counting&lt;/p&gt;
&lt;p&gt;The async API with DMA is your best option if you need to receive data fast with as little CPU intervention as possible.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase double buffer size for async UART caused EACCES</title><link>https://devzone.nordicsemi.com/thread/487258?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 09:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5c0452f-1754-46ac-af59-a05b0726876d</guid><dc:creator>kcl</dc:creator><description>&lt;p&gt;Thanks for the quick reply! So, it seems like a hardware limitation with the asynchronous UARTE.&lt;/p&gt;
&lt;p&gt;If so, are there any ways to work around this limitation? Because I&amp;#39;m looking for the most efficient way to handle a UART device that transmit 50KB total file size with 1024 bytes in one transaction. My though on bypass the limitation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Increase m&lt;span&gt;&lt;span&gt;aximum number of messages that can be queued. e.g.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;K_MSGQ_DEFINE&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uart_rx_msgq&lt;/span&gt;&lt;span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;sizeof&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uart_msg_queue_item&lt;/span&gt;&lt;span&gt;), 5&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;span&gt;(does the mcu perform fast enough to put data from uart isr to message queue? will there any byte&amp;nbsp;loss?)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Disable DMA with KConfig/command in asynchronous UART API.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;if 1&amp;amp;2 not possible, is switching to interrupt-based approach be the only solution in this case?&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Any insights or recommendations would be greatly appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase double buffer size for async UART caused EACCES</title><link>https://devzone.nordicsemi.com/thread/487249?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 09:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7584a13e-694a-4b01-b03c-6cf102cb3f69</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The UARTE DMA pointer on the nRF52832 is 8 bit wide, which limits the max. buffer size to 256 bytes.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1717493043309v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>