<?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>Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67597/problems-with-uarte-on-nrf52832</link><description>Hi. We are using nRF52832 and we have problem with UARTE. SoftDevice version - S132 5.0.0, SDK version - 14.2.0. Our application uses nRF and Mbed Serial to communicate with the GSM module using UART protocol with RTS/CTS flow control and sometimes reception</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Oct 2020 19:50:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67597/problems-with-uarte-on-nrf52832" /><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277482?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 19:50:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:590cd39f-041b-4c69-ac71-103b3840861c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;From the screenshot you sent earlier it looks like one byte (I assume that is with 1start bit and 1 stop bit) take about 35.02us = ~28.600baud. The closest then I assume would be 28.800baud and starting hfclk before reception. &lt;span style="text-decoration:line-through;"&gt;If that still fails, then you would need to add some debugging to make sure that you don&amp;#39;t by accident start rx in the middle of a transaction by adding some pin toggling or similar on a spare gpio (e.g. maybe the rx start is delayed for instance if the softdevice block the application code for a period of time). Also check if serial library may start rx through the uart interrupt handler.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;After looking at your initial screenshot I can see that the timing between RXRDY events are far bigger than the timing between UART bytes. So there must be a mismatch in baudrate here.&lt;/p&gt;
&lt;p&gt;I do not understand what is causing the seemingly large delay from first UART byte to GPIOTE toggling indicating RXRDY. If there is a PPI channel from RXRDY to GPIOTE toggling I would expect them to be much closer in time.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277480?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 19:37:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6f1d095-df09-47af-9129-8c41ac627248</guid><dc:creator>A1exey</dc:creator><description>[quote userid="2111" url="~/f/nordic-q-a/67597/problems-with-uarte-on-nrf52832/277478#277478"]Then the other alternative is that the baud rate is way off. A bit difficult to see from the trace, but looks like 28800baud?[/quote]
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;I made sure that the nRF and modem are using the same baud rate (&lt;span class="ILfuVd"&gt;&lt;span class="hgKElc"&gt;38400&lt;/span&gt;&lt;/span&gt;).&lt;/span&gt; &lt;span class="" title=""&gt;Also tried different baud rates in the range from 9600 to 115200.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277478?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 19:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55329c94-d9e3-475b-8594-b524d0dbbdca</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Then the other alternative is that the baud rate is way off. A bit difficult to see from the trace, but looks like 28800baud?&lt;/p&gt;
&lt;p&gt;In any case, I think using libuarte is the way to go.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277474?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 17:58:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a7bf77f-3d76-442b-878d-3cdf79226316</guid><dc:creator>A1exey</dc:creator><description>&lt;p&gt;In the current implementation, the STARTRX task is triggered before the command is sent to the modem, so reception is guaranteed not to start &lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;while receiving a response&lt;/span&gt;&lt;/span&gt;. The STOPRX task is also triggered some time after receiving a full response from the modem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277244?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 19:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f76600c-1dc5-4118-bfa3-e09fdf4c3988</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suspect that UART RX is started in the middle of an UART byte, this would trigger a framing error.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277241?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 19:43:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf14c04c-1406-4e00-8a94-fd6f9521d5cd</guid><dc:creator>A1exey</dc:creator><description>&lt;p&gt;I read the value of the ERRORSRC register immediately after receiveing the error and saw that it contains a framing error bit (according to the documentation, this means: &amp;quot;A valid stop bit is not detected on the serial data input after all bits in a character have been received.&amp;quot;). But the signal from modem looks good on digital analyzer:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/931x219/__key/communityserver-discussions-components-files/4/dsview_5F00_error_5F00_7_5F00_errorsrc_3D00_4.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Level toggling on channel 10 corresponds to RXRDY events. In this example, events stop generating correctly after the fourth byte.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="2111" url="~/f/nordic-q-a/67597/problems-with-uarte-on-nrf52832/277042#277042"]Also, how the serial library will handle this error would be interesting to look at[/quote]
&lt;p&gt;There is no error handling in the code, so the only result of this error is data corruption.&lt;/p&gt;
[quote userid="2111" url="~/f/nordic-q-a/67597/problems-with-uarte-on-nrf52832/277042#277042"]Personally I would recommend checking out the libuarte example and library if possible[/quote]
&lt;p&gt;Thanks, I will check it later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/277042?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 08:41:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3be4af9-051e-4412-896c-418e6915b841</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I am not familiar with the mbed serial, but it could be interesting to find if there is an error triggered and which one:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html#register.ERRORSRC"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html#register.ERRORSRC&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This error is likely handled by the UART interrupt handler, so you may need to set a breakpint to catch it. Also, how the serial library will handle this error would be interesting to look at, for instance does it just stop the UART, in that case you may need to init the library again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Personally I would recommend checking out the libuarte example and library if possible:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/libuarte_example.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/libuarte_example.html&lt;br /&gt;&lt;/a&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_libuarte.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_libuarte.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/276971?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2020 18:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fff649ae-a4e9-4a0b-a121-d5a3f9a75403</guid><dc:creator>A1exey</dc:creator><description>&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Thanks for the reply! I tried this solution but unfortunately it didn&amp;#39;t help, errors still occur&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UARTE on nRF52832</title><link>https://devzone.nordicsemi.com/thread/276756?ContentTypeID=1</link><pubDate>Sun, 25 Oct 2020 20:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3039ebe-425c-41e8-93cf-a43a41cf3b65</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;it&amp;#39;s likely that errors are occuring due to oscillator switching (HFINT&amp;lt;-&amp;gt;HFXO). Try to call sd_clock_hfclk_request() to force CPU work from HFXO all the time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>