<?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>Migration from nRF24 to nRF5x</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94112/migration-from-nrf24-to-nrf5x</link><description>We have a product on the market that uses the nRF24 and a PIC, chosen primarily for it&amp;#39;s cost and rapid development time. We are now looking into using a nRF52 to replace both the nRF24 and the PIC. I think I understand how ESB works on the nRF52, but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Nov 2022 10:40:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94112/migration-from-nrf24-to-nrf5x" /><item><title>RE: Migration from nRF24 to nRF5x</title><link>https://devzone.nordicsemi.com/thread/397129?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 10:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2357358e-d5a3-4299-8719-7e2fc652ad4e</guid><dc:creator>Kenneth</dc:creator><description>[quote user="mej7000"]&lt;strong&gt;Therefore&lt;/strong&gt;&lt;br /&gt;pipe0&amp;#39;s address = {0xE7, 0xE7, 0xE7, 0xE7,&lt;span&gt;0xE7&lt;/span&gt;};&lt;br /&gt;&lt;span&gt;pipe1&amp;#39;s address:&amp;nbsp;&lt;/span&gt;&lt;span&gt;= {0xC2, 0xC2, 0xC2, 0xC2,0xC2};&lt;/span&gt;&lt;br /&gt;pipe2&amp;#39;s address:&amp;nbsp;&lt;span&gt;= {0xC2, 0xC2, 0xC2, 0xC2,0xC3};&lt;br /&gt;...&lt;br /&gt;pipe7&amp;#39;s address:&amp;nbsp;= {0xC2, 0xC2, 0xC2, 0xC2,0xC8};&lt;/span&gt;[/quote]
&lt;p&gt;Correct.&lt;/p&gt;
[quote user="mej7000"]In the example I can&amp;#39;t find a&amp;nbsp;line which sets the address length. Am I missing something or is there a default assumed that I can’t find?[/quote]
&lt;p&gt;It can be controlled by calling&amp;nbsp;esb_set_address_length(), I can see default values are in esb.c:&lt;/p&gt;
&lt;div&gt;&lt;span&gt;/* Default address configuration for ESB.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;* Roughly equal to the nRF24Lxx defaults, except for the number of pipes,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;* because more pipes are supported.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;__ALIGN&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; esb_address esb_addr = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .base_addr_p0 = {&lt;/span&gt;&lt;span&gt;0xE7&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xE7&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xE7&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xE7&lt;/span&gt;&lt;span&gt;},&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .base_addr_p1 = {&lt;/span&gt;&lt;span&gt;0xC2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC2&lt;/span&gt;&lt;span&gt;},&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .pipe_prefixes = {&lt;/span&gt;&lt;span&gt;0xE7&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC3&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC4&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC5&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC6&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC7&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xC8&lt;/span&gt;&lt;span&gt;},&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .addr_length = &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .num_pipes = CONFIG_ESB_PIPE_COUNT,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .rf_channel = &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .rx_pipes_enabled = &lt;/span&gt;&lt;span&gt;0xFF&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
[quote user="mej7000"] Is that general advice moving forward[/quote]
&lt;p&gt;nRF Connect SDK (NCS) is the recommended SDK moving forward yes, I can see you have initially chosen to download the nRF5 SDK which is no longer recommended for new designs. Unfortunately our web page is not fully up to date, so it&amp;#39;s easy mistake to download the old nRF5 SDK for development.&lt;/p&gt;
[quote user="mej7000"]Channel. I also don&amp;#39;t see&amp;nbsp;nrf_esb_set_rf_channel() in the example code. It isn&amp;#39;t clear to me what values are acceptable. Is it the full channel (2440) or just the 40 or something else?[/quote]
&lt;p&gt;See the following struct for a description of the rc_channel:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;/* Enhanced ShockBurst address.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;* Enhanced ShockBurst addresses consist of a base address and a prefix&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;* that is unique for each pipe. See @ref esb_addressing in the ESB user&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;* guide for more information.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; esb_address {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; base_addr_p0[&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;];&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;/* Base address for pipe 0, in big endian. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; base_addr_p1[&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;];&lt;/span&gt;&lt;span&gt; &amp;nbsp; /* Base address for pipe 1-7, in big endian. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; pipe_prefixes[&lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt;];&lt;/span&gt;&lt;span&gt; &amp;nbsp; /* Address prefix for pipe 0 to 7. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; num_pipes;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Number of pipes available. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; addr_length;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp;/* Length of the address plus the prefix. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; rx_pipes_enabled;&lt;/span&gt;&lt;span&gt; &amp;nbsp; /* Bitfield for enabled pipes. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; rf_channel;&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Channel to use (between 0 and 100). */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The radio support 0 to 100, however radio regulations limit the channels to 2 to 81.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration from nRF24 to nRF5x</title><link>https://devzone.nordicsemi.com/thread/397011?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 18:27:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bd90f28-55d1-4d87-ba9a-a629bfdf4a9c</guid><dc:creator>mej7000</dc:creator><description>&lt;p&gt;Thanks Kenneth, I think I am getting a handle on this. Can you elaborate more on the base addresses and the prefix. I had read the documentation, but it still leaves me with questions. I could probably experiment and get it to work, but I would like to understand it better.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Does it mean that &lt;span style="text-decoration:underline;"&gt;1 byte&lt;/span&gt; is taken from the addr_prefix[8] array, but the particular byte to be appended is determined by the Pipe(0-7) that is being initialized?&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};&lt;br /&gt;uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};&lt;br /&gt; uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Therefore&lt;/strong&gt;&lt;br /&gt;pipe0&amp;#39;s address = {0xE7, 0xE7, 0xE7, 0xE7,&lt;span&gt;0xE7&lt;/span&gt;};&lt;br /&gt;&lt;span&gt;pipe1&amp;#39;s address:&amp;nbsp;&lt;/span&gt;&lt;span&gt;= {0xC2, 0xC2, 0xC2, 0xC2,0xC2};&lt;/span&gt;&lt;br /&gt;pipe2&amp;#39;s address:&amp;nbsp;&lt;span&gt;= {0xC2, 0xC2, 0xC2, 0xC2,0xC3};&lt;br /&gt;...&lt;br /&gt;pipe7&amp;#39;s address:&amp;nbsp;= {0xC2, 0xC2, 0xC2, 0xC2,0xC8};&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;In the example I can&amp;#39;t find a&amp;nbsp;line which sets the address length. Am I missing something or is there a default assumed that I can&amp;rsquo;t find? I expected to&amp;nbsp;see&amp;nbsp;something like this in the example:&amp;nbsp; &lt;br /&gt;&lt;br /&gt;err_code = nrf_esb_set_address_length(5);&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Regarding the nRF Connect SDK (NCS). I thought I was using that already. Is that general advice moving forward or do you see something in my question that leads you to believe I&amp;#39;m not using the right thing ?(which is very possible)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Channel. I also don&amp;#39;t see&amp;nbsp;nrf_esb_set_rf_channel() in the example code. It isn&amp;#39;t clear to me what values are acceptable. Is it the full channel (2440) or just the 40 or something else?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is my transmitter&amp;nbsp;(ESP32/Arduino IDE) setup:&lt;/p&gt;
&lt;p&gt;/************************************************************************&lt;br /&gt;18:10:18.093 -&amp;gt; SPI Frequency = 10 Mhz&lt;br /&gt;18:10:18.093 -&amp;gt; Channel = 40 (~ 2440 MHz)&lt;br /&gt;18:10:18.093 -&amp;gt; RF Data Rate = 1 MBPS&lt;br /&gt;18:10:18.093 -&amp;gt; RF Power Amplifier = PA_LOW&lt;br /&gt;18:10:18.093 -&amp;gt; RF Low Noise Amplifier = Enabled&lt;br /&gt;18:10:18.127 -&amp;gt; CRC Length = 8 bits&lt;br /&gt;18:10:18.127 -&amp;gt; Address Length = 5 bytes&lt;br /&gt;18:10:18.127 -&amp;gt; Static Payload Length = 32 bytes&lt;br /&gt;18:10:18.127 -&amp;gt; Auto Retry Delay = 1500 microseconds&lt;br /&gt;18:10:18.127 -&amp;gt; Auto Retry Attempts = 15 maximum&lt;br /&gt;18:10:18.127 -&amp;gt; Packets lost on&lt;br /&gt;18:10:18.127 -&amp;gt; current channel = 0&lt;br /&gt;18:10:18.127 -&amp;gt; Retry attempts made for&lt;br /&gt;18:10:18.127 -&amp;gt; last transmission = 15&lt;br /&gt;18:10:18.127 -&amp;gt; Multicast = Disabled&lt;br /&gt;18:10:18.127 -&amp;gt; Custom ACK Payload = Disabled&lt;br /&gt;18:10:18.127 -&amp;gt; Dynamic Payloads = Disabled&lt;br /&gt;18:10:18.127 -&amp;gt; Auto Acknowledgment = Disabled&lt;br /&gt;18:10:18.127 -&amp;gt; Primary Mode = TX&lt;br /&gt;18:10:18.160 -&amp;gt; TX address = 0xc2c2c2c2c2&lt;br /&gt;18:10:18.160 -&amp;gt; pipe 0 ( open ) bound = 0xc2c2c2c2c2&lt;br /&gt;18:10:18.160 -&amp;gt; pipe 1 ( open ) bound = 0xe7e7e7e7e7&lt;br /&gt;18:10:18.160 -&amp;gt; pipe 2 (closed) bound = 0xc3&lt;br /&gt;18:10:18.160 -&amp;gt; pipe 3 (closed) bound = 0xc4&lt;br /&gt;18:10:18.160 -&amp;gt; pipe 4 (closed) bound = 0xc5&lt;br /&gt;18:10:18.160 -&amp;gt; pipe 5 (closed) bound = 0xc6&lt;br /&gt;*************************************************************************/&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The prefix is always required yes, see:&amp;nbsp;&lt;br /&gt; &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html#concept_mdy_kcj_4r"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html#concept_mdy_kcj_4r&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;For all new development you should use the nRF Connect SDK (NCS), see:&lt;br /&gt; &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement" data-contentid="1eb7793f6986401785e3ba4eed7451e6" data-contenttypeid="f7d226abd59f475c9d224a79e3f0ec07"&gt;nRF Connect SDK and nRF5 SDK statement&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="padding-left:30px;"&gt;To get started with NCS check out:&lt;br /&gt; &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;The nRF Connect SDK is using the zephyr RTOS. ESB is also supported in NCS:&lt;br /&gt; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_esb.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_esb.html#&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration from nRF24 to nRF5x</title><link>https://devzone.nordicsemi.com/thread/396889?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 12:09:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38230d97-fc15-40a8-b20c-aabeb246c6bb</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;1. The prefix is always required yes, see:&amp;nbsp;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html#concept_mdy_kcj_4r"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html#concept_mdy_kcj_4r&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Correct, 250kbps not supported.&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;For all new development you should use the nRF Connect SDK (NCS), see:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;nRF Connect SDK and nRF5 SDK statement&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To get started with NCS check out:&lt;br /&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF Connect SDK is using the zephyr RTOS. ESB is also supported in NCS:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_esb.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_esb.html#&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. You can find an overview of the different nRF52-variants here:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/struct_nrf52/struct/nrf52.html"&gt;https://infocenter.nordicsemi.com/topic/struct_nrf52/struct/nrf52.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Typically there is no problem to use the nRF52840-DK for development, and later to swap to a different nRF52 variant if you find that you don&amp;#39;t use all the ram, flash and features that is available in the nRF52840 in specific. The only thing you need to do is then to update the possible gpios you are using and build for the target nRF52-variant you intend to use.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>