<?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>nRF9160 UARTE communication between 91 and 52 is unreliable</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65616/nrf9160-uarte-communication-between-91-and-52-is-unreliable</link><description>I have a setup where nRF91 and nRF52 on nRF9160 DK have to exchange ASCII strings over UART. nRF91 runs Zephyr and nRF52 - nRF SDK for Mesh. 
 When nRF52 is unprovisioned, there is a 50%..75% data loss in nRF91 to nRF52 direction (no RX event is fired</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Sep 2020 14:13:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65616/nrf9160-uarte-communication-between-91-and-52-is-unreliable" /><item><title>RE: nRF9160 UARTE communication between 91 and 52 is unreliable</title><link>https://devzone.nordicsemi.com/thread/268569?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2020 14:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cde00cf6-d23e-4734-a68f-db0c117ca1bb</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Ah, I should have read the code more thoroughly.&lt;br /&gt;&lt;br /&gt;Just to test could you rewrite your nRF9160 .overlay like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart2 {
      compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
      current-speed = &amp;lt;115200&amp;gt;;
      status = &amp;quot;okay&amp;quot;;
      tx-pin = &amp;lt;10&amp;gt;;
      rx-pin = &amp;lt;11&amp;gt;;
      rts-pin = &amp;lt;12&amp;gt;;
      cts-pin = &amp;lt;13&amp;gt;;
      hw-flow-control;
};&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In addition, do you have a logic analyzer available? It could help to see what&amp;#39;s happening on the different pins.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Lastly, this seems to be a timing issue of some sort (as you suggest). I have read through some old cases regarding data loss over UARTE on the nRF52840 and found that it could be problems with the clock. Could you try the fix in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60993/bit-loss-on-nrf52840-uarte-at-115-200"&gt;this thread&lt;/a&gt;&amp;nbsp;too?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UARTE communication between 91 and 52 is unreliable</title><link>https://devzone.nordicsemi.com/thread/268459?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2020 09:24:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:603047dd-b556-46fe-b7cf-f41403e46014</guid><dc:creator>HAFLN</dc:creator><description>&lt;p&gt;Good morning Carl,&lt;/p&gt;
&lt;p&gt;I believe we are using Easy DMA on both ends:&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;nRF91:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_2_NRF_UARTE=y&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;nRF52:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;NRF_SERIAL_CONFIG_DEF(m_serial_config, NRF_SERIAL_MODE_DMA,&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UARTE communication between 91 and 52 is unreliable</title><link>https://devzone.nordicsemi.com/thread/268424?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2020 08:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16427b41-0853-468c-bfe7-22e118a14290</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again, HAFLN.&lt;br /&gt;&lt;br /&gt;It could be that you&amp;nbsp;there are timing conflicts between UART and the softdevice/BLE operation, yes.&amp;nbsp;If I&amp;#39;m not mistaken you are using UART without easy DMA, which could starve the CPU of resources when running the BLE stack in addition.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you try to enable UARTE?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UARTE communication between 91 and 52 is unreliable</title><link>https://devzone.nordicsemi.com/thread/268366?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 15:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dc9e5d4-0779-4b18-b50c-035c26e1a1e3</guid><dc:creator>HAFLN</dc:creator><description>&lt;p&gt;Thanks Carl!&lt;/p&gt;
&lt;p&gt;Sorry, my mistake I sent the wrong pin settings for nRF52840 in my question (I had board settings for a wrong board open).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The actual pins are as you suggested and the problem stills stands: we are loosing big chunks of UART transmissions intermittently.&lt;/p&gt;
&lt;p&gt;Just a wild guess but could this be something to do with softdevice? Since once nRF52 is provisioned UART communication improves.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UARTE communication between 91 and 52 is unreliable</title><link>https://devzone.nordicsemi.com/thread/268208?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 07:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31282979-c66e-479d-af7a-5b80a3876ddb</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello, HAFLN!&lt;br /&gt;&lt;br /&gt;I suspect the unreliability is related to your pin assignments. The nRF52840 of the nRF9160DK acts as the board controller and is thus very limited in terms of available GPIO. Hence, I&amp;nbsp;recommend trying the pin assignments used for the nRF9160 and the nRF5240 in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.0/nrf/samples/nrf9160/lte_ble_gateway/README.html"&gt;LTE BLE gateway example&lt;/a&gt;. You already use the correct pins for the nRF9160. The nRF5240 is as follows:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart1 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	current-speed = &amp;lt;1000000&amp;gt;;
	status = &amp;quot;okay&amp;quot;;
	tx-pin = &amp;lt;17&amp;gt;;
	rx-pin = &amp;lt;20&amp;gt;;
	rts-pin = &amp;lt;15&amp;gt;;
	cts-pin = &amp;lt;22&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is from an overlay file, but you can use this to get the correct pin defines in your nRF Mesh code.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Hope this works!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>