<?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 high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84832/uart-high-speed-issue---zephyr-rtos</link><description>Hi everyone! 
 I ported some project from NRFsdk 17.0.2 (all works fine) to Zephyr rtos and faced with issue - when set high speed uart (460800 - 921600) then some bytes (in the end of packet ) have lost when ESP8266 send data to nrf52840 
 When speed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Feb 2022 12:38:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84832/uart-high-speed-issue---zephyr-rtos" /><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/354816?ContentTypeID=1</link><pubDate>Thu, 24 Feb 2022 12:38:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44115d13-1660-4dc7-84fd-f198de4c7d92</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;ok!!! done!!! all works fine!!!! Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/354691?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 21:10:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8994cf8c-1ddf-475b-9158-604161e113f8</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;Thanks. It works!!! But how can I keep system from FAULT when I send a big packet to nrf52840,&lt;/p&gt;
&lt;p&gt;When I send a very big packet of bytes it causes a fault&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERTION FAIL [err == 0] @ WEST_TOPDIR/nrf/samples/peripheral/lpuart/src/main.c:70
        Failed to provide new buffer
[00:01:22.163,604] &amp;lt;inf&amp;gt; app: Received data 27 bytes
[00:01:22.171,356] &amp;lt;inf&amp;gt; app: UART_RX_BUF_RELEASED
[00:01:22.171,417] &amp;lt;inf&amp;gt; app: Received data 64 bytes
[00:01:22.189,208] &amp;lt;inf&amp;gt; app: UART_RX_BUF_RELEASED
[00:01:22.189,270] &amp;lt;inf&amp;gt; app: Received data 64 bytes
[00:01:22.207,092] &amp;lt;inf&amp;gt; app: UART_RX_BUF_REQUEST
[00:01:22.207,183] &amp;lt;inf&amp;gt; app: UART_RX_BUF_RELEASED
[00:01:22.207,214] &amp;lt;inf&amp;gt; app: UART_RX_BUF_RELEASED
[00:01:22.207,275] &amp;lt;inf&amp;gt; app: UART_RX_BUF_REQUEST
[00:01:22.217,773] &amp;lt;err&amp;gt; os: r0/a1:  0x00000004  r1/a2:  0x00000046  r2/a3:  0x00000001
[00:01:22.217,803] &amp;lt;err&amp;gt; os: r3/a4:  0x0000001e r12/ip:  0x00000000 r14/lr:  0x000007af
[00:01:22.217,864] &amp;lt;err&amp;gt; os:  xpsr:  0x41000038
[00:01:22.217,895] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0000fa2c
[00:01:22.217,895] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:01:22.217,926] &amp;lt;err&amp;gt; os: Fault during interrupt handling

[00:01:22.217,926] &amp;lt;err&amp;gt; os: Current thread: 0x20000490 (unknown)
[00:01:22.321,929] &amp;lt;err&amp;gt; os: Halting system
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to increase buffer size but no result&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define BUF_SIZE 500
static K_MEM_SLAB_DEFINE(uart_slab, BUF_SIZE, 3, 4);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/354514?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 10:03:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3781c90-978c-4520-b131-549b6235e789</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The lpuart sample uses flow control (with &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fgpio.html&amp;amp;cp=4_0_0_5_8"&gt;GPIOs&lt;/a&gt; (req and rdy) instead of UARTS &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uarte.html?cp=4_0_0_5_33_8_22#register.PSEL.RTS"&gt;rts&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fuarte.html&amp;amp;cp=4_0_0_5_33_8_24&amp;amp;anchor=register.PSEL.CTS"&gt;cts&lt;/a&gt;), so I guess it will not work if the device (&lt;span&gt;ESP8266&amp;nbsp;&lt;/span&gt;) you&amp;#39;re communicating with does not have flow control. Check out the patch I provided that shows how to disable flow control:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart"&gt;https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/354504?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 09:46:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0255762-3f81-4adb-ab75-3fc49ce5b1c3</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I have tested lpuart sample and RX handle is pretty good for me, but TX is not working&lt;/p&gt;
&lt;p&gt;It wait for 10 seconds (timeout) and then ASSERT print an error &amp;quot;TX aborted&amp;quot;&lt;/p&gt;
&lt;p&gt;I tried to change state of this pins &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;req-pin = &amp;lt;22&amp;gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdy-pin = &amp;lt;23&amp;gt;;&lt;/p&gt;
&lt;p&gt;but no success&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/354357?ContentTypeID=1</link><pubDate>Tue, 22 Feb 2022 13:02:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09c32ccf-466a-4057-8693-5d4911a74e53</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you test the &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.9.0/samples/peripheral/lpuart"&gt;lpuart sample&lt;/a&gt;&amp;nbsp;and see if that works better? Here is the modifications I did to the sample to make it work without flow control:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart"&gt;https://github.com/nrfconnect/sdk-nrf/compare/v1.6.0...simon-iversen:lpuart_using_normal_uart&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/353755?ContentTypeID=1</link><pubDate>Fri, 18 Feb 2022 07:04:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93cc3237-6c3f-4ec4-9259-46f9b3527290</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;Thanks for reply, Simon.&lt;/p&gt;
&lt;p&gt;All works fine if incoming data length == UART_BUF_SIZE&lt;/p&gt;
&lt;p&gt;For example if I send 200 bytes and UART_BUF_SIZE = 200 then all ok.&lt;/p&gt;
&lt;p&gt;But if incoming length &amp;lt; 200 then I cant free buffer and then catch &amp;quot;no free memory for allocate rx buffer&amp;quot;&lt;/p&gt;
&lt;p&gt;Unfortunaly I cant use example uart implementation completely because I need to handle uart buffer without &amp;quot;\n\r&amp;quot; only by timout (my packet dont consist cr_lf)&lt;/p&gt;
&lt;p&gt;P.S. There is no free pins ESP8266 and I think flow control will not fix the issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART high speed issue - ZEPHYR rtos</title><link>https://devzone.nordicsemi.com/thread/353732?ContentTypeID=1</link><pubDate>Fri, 18 Feb 2022 00:08:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6d0dbac-a783-43b6-b578-d85a63e8311b</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It may be that you&amp;#39;re not able to handle the incoming data fast enough, you could look into that. Maybe you could upload the sample as a zipped file, and I can see if I can reproduce it.&lt;/p&gt;
&lt;p&gt;You could also try to enable flow control in an .overlay file, similar to how it&amp;#39;s done here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay#L7"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay#L7&lt;/a&gt;. Then check&amp;nbsp;the file &amp;lt;sample&amp;gt;\build\zephyr\zephyr.dts what rts-pin and cts-pin are for uart0 and connect the nRF52840 to the &lt;span&gt;ESP8266&amp;nbsp;&lt;/span&gt;accordlngly.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>