<?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>Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97138/implementing-interference-free-uart-communication-in-a-zephyr-based-ble-mesh</link><description>Hi everyone. 
 
 I am running a BLE mesh stack in my Zephyr-based application and need to interface with another device using UART. 
 How can I implement UART communication to avoid any interference with the BLE mesh stack? 
 tell me if its correct or</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Mar 2023 13:08:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97138/implementing-interference-free-uart-communication-in-a-zephyr-based-ble-mesh" /><item><title>RE: Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/415219?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 13:08:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81360194-b194-4e3a-8379-38ac4b53e971</guid><dc:creator>cedriczz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your response.&lt;/p&gt;
&lt;p&gt;The issue is fixed I end up using&amp;nbsp; the asynchronous api based on devzone academie example&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/415194?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 12:32:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20dfa2ff-9eb8-4152-a09f-fd53b5070b3a</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello Cedric, and so sorry about the delay. Its been a bit busy here, and I haven&amp;#39;t been able to prioritize you.&lt;/p&gt;
[quote user="cedriczz"]Here my little prototype that involves two nRF52840 DK and I am trying to establish a communication between the two boards using UARTE&amp;nbsp;based on this&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_uarte."&gt;example&lt;/a&gt;.[/quote]
&lt;p&gt;Which of the samples did you base it on?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="cedriczz"]However, when you press the button for the second time, an error event&amp;nbsp;&lt;span&gt;NRFX_UARTE_EVT_ERROR.&lt;/span&gt;[/quote]
&lt;p&gt;I see. Could you share the entire error message? This is typically due to that not the&amp;nbsp;entire buffer is being reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfvomg&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/412930?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 09:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:658c23ab-16c4-46e5-ba6a-ff19ccbf89a3</guid><dc:creator>cedriczz</dc:creator><description>&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_uarte"&gt;github.com/.../nrfx_uarte&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/412927?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 09:15:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e41e154c-c8fd-4340-b024-19149814d285</guid><dc:creator>cedriczz</dc:creator><description>&lt;p&gt;Thanks Elfving&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will go with UARTE to get the EasyDMA&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here my little prototype that involves two nRF52840 DK and I am trying to establish a communication between the two boards using UARTE&amp;nbsp;based on this&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_uarte."&gt;example&lt;/a&gt;. one nRF52840 DK acts as the transmitter and the other is the receiver.&lt;/p&gt;
&lt;p&gt;I modified the example to sends a message or call&lt;strong&gt;&amp;nbsp; nrfx_uarte_tx()&amp;nbsp;&lt;/strong&gt;&amp;nbsp;when a button is pressed,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The first time I press the button, the message is successfully transmitted and received by the receiver board, and everything works as expected. However, when you press the button for the second time, an error event&amp;nbsp;&lt;span&gt;NRFX_UARTE_EVT_ERROR.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I &amp;nbsp;tried resetting the receive buffer using memset to clear the buffer, but the issue persists. not sure if I need to uninitialize the UART after receiving a message or perform some other action to be able to send more than one successful message.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you help me on this please ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cedric&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/412530?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 13:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5def9586-7422-4a72-a205-68b467cee794</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello Cedric,&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="font-size:inherit;"&gt;How can I implement UART communication to avoid any interference with the BLE mesh stack?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This shouldn&amp;#39;t be a real problem either way, as these things are handled by threads of different priorities - what is time critical gets priority. Though with UARTE you get EasyDMA which would make sure that the CPU doesn&amp;#39;t get interrupted. If you want DMA, which I assume you do, go for UARTE. One negative side of DMA would be a slightly higher power consumption, but as you&amp;#39;re doing Mesh I assume that is of no big concern.&lt;/p&gt;
&lt;p&gt;If you are getting started I should mention that you should have a look at the &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;DevAcademy&lt;/a&gt;. There is a section on UART there as well!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>