<?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>Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117268/does-zephyr-have-a-turnkey-drop-in-solution-for-communicating-between-two-processors-via-uart</link><description>Hello, 
 I am currently working through the nRF Connect SDK Intermediate training in preparation for an upcoming project. Said project will require communication between two physically separate processors over UART. Specifically, a nRF91 modem and a nRF52</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Jan 2025 15:03:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117268/does-zephyr-have-a-turnkey-drop-in-solution-for-communicating-between-two-processors-via-uart" /><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/517519?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 15:03:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26c841a2-3f91-44e3-8de4-227ce6946de9</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;Hey Helmut,&lt;/p&gt;
&lt;p&gt;I am sure many people would find that useful! My concern with RPC is the overhead though since it seems to spawn a new thread for every message received / processed. See my comments and concerns about RPC above.&lt;/p&gt;
&lt;p&gt;In the meantime, I will close those ticket since it doesn&amp;#39;t seem a lightweight and robust solution already exists.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Derek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/516004?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 21:58:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8175614-14d1-400d-be24-7898471508b5</guid><dc:creator>khelmutlord</dc:creator><description>&lt;p&gt;I&amp;#39;d like to add that I have a pending PR for COBS in upstream Zephyr.&amp;nbsp;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/pull/83072"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/83072&lt;/a&gt;&amp;nbsp;I hope to use this to create a more full featured RPC method as you requested--seems like it would be useful for a lot of people.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Helmut Lord&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/516003?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 21:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bf0f73c-3955-4fbe-9819-0145b6f2a0a1</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;Hey Edvin, after reviewing these examples, it looks like you are still required to hook everything together in software. It also looks like the&amp;nbsp;&lt;em&gt;ncs\zephyr\samples\bluetooth\hci_uart sample&lt;/em&gt;&amp;nbsp;uses the H:4 HCI transport protocol which has no error checking (CRC for example).&lt;/p&gt;
&lt;p&gt;Based on this, it doesn&amp;#39;t look like an adequate, robust, and generic drop-in solution with error checking exists for Zephyr in regard to communication between two MCU&amp;#39;s using a UART.&lt;/p&gt;
&lt;p&gt;I guess I will just write my own modular solution that I can easily port to other Zephyr projects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/515998?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 18:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47e98cfa-97cb-4a56-88f6-8db86f8f2c23</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;Hey Edvin,&lt;/p&gt;
&lt;p&gt;Somehow I overlooked this reply, my apologies. I will take a look at this &amp;quot;connectivity_bridge&amp;quot; example to better understand what framing / transport methods are used.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/117268/does-zephyr-have-a-turnkey-drop-in-solution-for-communicating-between-two-processors-via-uart/514996"]So are those the two things that you want to communicate with eachother?[/quote]
&lt;p&gt;Yes exactly. The use case you described is what we intend to do. The nRF91 will talk to a Nordic BLE module over UART to provide BLE connectivity for our specific application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/515829?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 22:08:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:197590b2-9111-4e5c-a7e7-27d3b5d9262d</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/khelmutlord"&gt;khelmutlord&lt;/a&gt;&amp;nbsp; Any feedback on my additional questions above?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Derek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/514996?ContentTypeID=1</link><pubDate>Sat, 14 Dec 2024 22:22:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8db55498-1e68-48b0-84bc-f41c73a644b2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I may be a bit late to the party, but you mentioned:&amp;nbsp;&lt;/p&gt;
[quote user=""]Specifically, a nRF91 modem and a nRF52 BLE module[/quote]
&lt;p&gt;So are those the two things that you want to communicate with eachother? In that case, there are samples in the nRF Connect SDK (NCS) showing how to do this. I don&amp;#39;t know exactly what you intend to do, but if you aim to have the main application running on an nRF91&amp;#39;s application core, communicate with the modem core, and use the nRF52 as a BLE device, then we have samples doing this. One of these is the NCS\nrf\applications\connectivity_bridge (particularly meant to be running on an Thingy91). This utilizes the onboard nRF52840 as a BLE device (running the ncs\zephyr\samples\bluetooth\hci_uart sample)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/514970?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 23:03:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64ccc217-5554-4fb1-bac8-11ac19db2201</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;Hey Helmut,&lt;/p&gt;
&lt;p&gt;The nRF RPC library looks interesting! After a bit of research, there are a couple things that concern me:&lt;/p&gt;
&lt;p&gt;&amp;quot;Events always reserve a new thread from the remote thread pool. Pay special attention when sending multiple events one after another, because each event reserves a new thread. Sending events too fast might consume the entire thread pool and, as a result, block all outgoing commands and events until a thread becomes available in the thread pool.&amp;quot;&lt;/p&gt;
&lt;p&gt;Source:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_rpc/doc/architecture.html#threads"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_rpc/doc/architecture.html#threads&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A new thread is allocated for each message received? This seems a bit excessive and resource intensive. It also seems like it would force rapid task switching by the OS scheduler when receiving large amounts of data, such as for firmware updates over UART.&lt;/p&gt;
&lt;p&gt;For example, in our FreeRTOS UART protocol implementation, we update another processor and its attached OSPI flash with megabytes of firmware images. We essentially slam the UART with as much data as we can at 1 Mbps for firmware updates.&lt;/p&gt;
&lt;p&gt;Question 1: Given the above comments, would the nRF RPC library be a good choice for large payloads while achieving relatively high throughput and while maintaining a low RAM footprint?&lt;/p&gt;
&lt;p&gt;Question 2: Is the framing layer documented anywhere? Specifically, the synchronization bytes?&lt;/p&gt;
&lt;p&gt;I see the RPC packet structure, but nothing about framing / synchronization / packet delimiters.&lt;/p&gt;
&lt;p&gt;Source:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_rpc/doc/protocol_specification.html#nrf_rpc_packet_format"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_rpc/doc/protocol_specification.html#nrf_rpc_packet_format&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I ask this because we may have a future use case of communicating with an Android/Iphone, and could leverage the same protocol if possible.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Derek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/514968?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 22:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4764b7c7-e42e-4809-a451-4ed1887d3f00</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/amarch01"&gt;AMarch01&lt;/a&gt;&amp;nbsp;&amp;nbsp;COBS is interesting after taking a quick look, thanks for sharing! I agree though, it seems like a framing technique similar to SLIP, unless I missed something.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/514942?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 15:58:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca5cc997-6bbe-4d27-b767-507dea3eb91d</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;hmmm, I never thought of it, but yeah, you could use the RPC to send general data arguments back and forth.&lt;br /&gt;I have to keep that in mind.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/514928?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 14:52:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98db1755-8949-49ca-a6cd-5de75f734ba8</guid><dc:creator>khelmutlord</dc:creator><description>&lt;p&gt;Good point on COBS. I used that at my last job for packet framing (is it really packet framing? haha).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We provide the nRF RPC library that may fit what you are looking to do. It is using CBOR in the background:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_rpc/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_rpc/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Helmut Lord&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?</title><link>https://devzone.nordicsemi.com/thread/514927?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 14:48:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d95c88-632b-46b0-bdbc-24acf5f02297</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;I don&amp;#39;t really have an answer for you. Such a thing is sort of as needed per application. I am not aware of any ready to go serial data transports.&amp;nbsp;&lt;br /&gt;These days I send packets using COBS (yeah, I know ...its a transport thing). I like it because all I have to scan for is zeros in the steam to identify packets. This could easily be set up in a thread with a semaphore indicating that a packet has shown up.&amp;nbsp;&lt;br /&gt;&lt;a href="https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing"&gt;Consistent Overhead Byte Stuffing - Wikipedia&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;Also, for common serialization of data, there are many ways to go but the nrf library has a CBOR library to help there.&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/NordicSemiconductor/zcbor"&gt;GitHub - NordicSemiconductor/zcbor: Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;No... not really an answer to your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>