<?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>UARTE RX error and crash when quik insert and remove RX pin</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110928/uarte-rx-error-and-crash-when-quik-insert-and-remove-rx-pin</link><description>When we try to test the stability of the UARTE peripheral, we find that when inserting and removing the RX pin, the uarte_handler callback function is very likely to goes to NRFX_UARTE_EVT_ERROR state with error_code = 4. We try to reinitialize the UARTE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 May 2024 08:34:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110928/uarte-rx-error-and-crash-when-quik-insert-and-remove-rx-pin" /><item><title>RE: UARTE RX error and crash when quik insert and remove RX pin</title><link>https://devzone.nordicsemi.com/thread/485972?ContentTypeID=1</link><pubDate>Mon, 27 May 2024 08:34:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d96eb629-989a-466d-a2f6-ee457b52cfb0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Letian&lt;/p&gt;
&lt;p&gt;Good to hear you were able to solve the issue. I will consider the ticket resolved then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE RX error and crash when quik insert and remove RX pin</title><link>https://devzone.nordicsemi.com/thread/485927?ContentTypeID=1</link><pubDate>Sun, 26 May 2024 18:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f8f6c74-f005-4a4b-a823-1d1acaac3ce7</guid><dc:creator>Brian_Chen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We have solve the problem, it seems to be the problem of the interrupt and the thread. We have change the interrupt mode and also add a small delay after the RX_ERROR happened.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;Letian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE RX error and crash when quik insert and remove RX pin</title><link>https://devzone.nordicsemi.com/thread/482430?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 07:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4eec448-4bb2-4767-be00-6bf8efa11fea</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Letian&lt;/p&gt;
&lt;p&gt;In non blocking mode it should not be necessary to clear the error, no, this should happen automatically by the driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What if you try to restart RX when the issue occurs?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I made a small wrapper for the UART async driver some time back, in order to provide a simple UART API without relying on dynamic memory allocation.&amp;nbsp;Feel free to have a look for reference:&lt;br /&gt;&lt;a href="https://github.com/too1/ncs-uart-handler"&gt;https://github.com/too1/ncs-uart-handler&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE RX error and crash when quik insert and remove RX pin</title><link>https://devzone.nordicsemi.com/thread/482390?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 22:30:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a0c5376-68db-49a5-81ae-a1a10f5c9485</guid><dc:creator>Brian_Chen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;If we ignore the error, the uarte_handler will always goes to NRFX_UARTE_EVT_ERROR after we reconnect RX pin, even we flush the RX buffer. Do we need to manually clear the error after we reach the EVT_ERROR?&lt;/p&gt;
&lt;p&gt;We are currently try to transfer the nrfx_uarte to zephyr uart async API, we will test it as soon as we get there.&lt;/p&gt;
&lt;p&gt;We have organized a separate test file for test the uarte individually, I can send it to you if you want it (I don&amp;#39;t know if I can upload it in this post).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Letian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE RX error and crash when quik insert and remove RX pin</title><link>https://devzone.nordicsemi.com/thread/482268?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 12:00:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b83707a1-8df4-4c1c-8bac-f44f033c3ace</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Letian&lt;/p&gt;
&lt;p&gt;Have you tried any of the higher level UART drivers, like the UART async driver?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A couple of comments to your implementation:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) I am not sure how well it works to deinit and init the driver in the interrupt directly. Have you tried to schedule this operation using a work item?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) Technically it shouldn&amp;#39;t be necessary to do a full re-init of the driver whenever an error occurs. What happens if you simply ignore the error? Will UART operation stop?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>