<?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>Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74854/serial-uarte-rx-fails-with-continuous-timeout-error</link><description>Hi, 
 I have a custom board with nrf52840 with UARTE1 instance enabled for RS485 communication. 
 I have 2 boards on the same configuration and trying to send data to each other. 
 below is the UARTE instance used 
 
 Serial UARTE is initialized with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Jun 2021 07:56:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74854/serial-uarte-rx-fails-with-continuous-timeout-error" /><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/313291?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 07:56:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5856485a-9002-4147-a6a3-94e44679d5e0</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If your application needs a high precision clock (better than internal RC oscillator) Then you need to have XTAL HFCLK on your PCB connected to nRF which can be started using the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fhardware_driver_clock.html&amp;amp;resultof=%22%6e%72%66%5f%64%72%76%5f%63%6c%6f%63%6b%5f%68%66%63%6c%6b%5f%72%65%71%75%65%73%74%22%20"&gt;clock module&lt;/a&gt;&amp;nbsp;using the API &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrf__drv__clock.html&amp;amp;anchor=ga425c8dc0508bb9c0777da123b7c66f3d"&gt;nrf_drv_clock_hfclk_request&lt;/a&gt;. If you have this enabled on both peer and your device, there is better accuracy of the clocks on UART and hence less probability of of clocks jittering causing framing errors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/312841?ContentTypeID=1</link><pubDate>Tue, 01 Jun 2021 11:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:982e2f3d-be20-413c-b316-e21622249548</guid><dc:creator>Manjunath S</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/74854/serial-uarte-rx-fails-with-continuous-timeout-error/311264#311264"]HFCLK [/quote]
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are using the internal clock for this communication. and the baud rates are set as per the code above.&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;&lt;strong&gt;nrf_serial_write() &lt;/strong&gt;and&amp;nbsp;&lt;strong&gt;nrf_serial_read() &lt;/strong&gt;functions to write and read. I am not aware of the HFCLK you are mentioning. Could you please let me know&amp;nbsp;where it needs to be set/configured?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/311264?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 18:39:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ca59f05-b8f9-4352-a92d-2afe39c36be5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;if you have XTAL HFCLK on both peer and this device, then there are times when RC HFCLK is on before your turn on the XTAL. I would like to understand more, if you enable the same clock on both ends before the first transaction is started? and also keep using the same clocks through ? I have not seen framing errors on UART if the clocks on both devices are exactly the same. Can you please shed more light on how and where you enable the HFCLK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/311206?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 06:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3185594b-29ca-4673-8c5c-bedd1ea226ce</guid><dc:creator>Manjunath S</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are using the same&amp;nbsp;hardware configuration in both devices, so I doubt there will be any clock deviation. Just want to know what else could be the reason for this?&lt;/p&gt;
&lt;p&gt;We are also using other interrupts for some sensors, could that also have any impact on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/309000?ContentTypeID=1</link><pubDate>Mon, 10 May 2021 13:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9242be46-84eb-4c48-92b1-f04dcb23cd59</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This error mostly happens when there is inaccuracies between the clocks used between two UART devices. You can first try to understand why how much inaccurate clock you are using on your end&amp;nbsp;or&amp;nbsp;on the peer&amp;#39;s end If the inaccuracy turned out to be on the nRF device clock, then it depends on the 16M clock used. If you are using an external crystal clock, I would check the spec of that crystal to see how much this clock can deviate than the required 16MHz.&lt;/p&gt;
&lt;p&gt;When it comes to how to handle the framing error, the easiest way is to reset the UART driver like what you already are doing. But the clocks will deviate again causing the frame error to happen soon in the future.&lt;/p&gt;
&lt;p&gt;You should first try to understand the cause of the framing error first. Study the clocks you are using and measure the clock drifts between your clock and the peer uart clock.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/308958?ContentTypeID=1</link><pubDate>Mon, 10 May 2021 12:09:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6699f2d-0ca4-45eb-9602-6a3792026dba</guid><dc:creator>Manjunath S</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes I have the error&amp;nbsp;NRF_SERIAL_EVENT_DRV_ERR. and checking on the error it seems to be&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;NRF_UARTE_ERROR_FRAMING_MASK error in the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;nrf_uarte_error_mask_t.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I would like to know how to overcome this.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;As of now I am just doing de-init and init of the serial instance. this works fine for some more time, again it goes into this state. this is random again, sometimes 50s sometimes 2mins. Sometimes the re-init also doesn&amp;#39;t solve it, I get the same error till I do 4-5 re-inits&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial UARTE Rx fails with continuous timeout error</title><link>https://devzone.nordicsemi.com/thread/308934?ContentTypeID=1</link><pubDate>Mon, 10 May 2021 11:06:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e4b146d-2757-4100-a759-1aa58cdfabba</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Can you please check if you have&amp;nbsp; NRF_DRV_UART_EVT_ERROR before your system ends up in this state? If yes, can you tell us which error it was and how you are handling this error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>