<?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>Speeding up ESB on nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72577/speeding-up-esb-on-nrf52</link><description>I have to stream packets from an nrf52 to an nrf24 at a 30 kHz rate using ESB. But when I try to do this, the receiver only receives some of the packets. I don&amp;#39;t believe the problem is with the receiver, as I have verified with a logic analyzer that when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Mar 2021 18:01:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72577/speeding-up-esb-on-nrf52" /><item><title>RE: Speeding up ESB on nrf52</title><link>https://devzone.nordicsemi.com/thread/299343?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 18:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81bf6774-7e47-4f45-93a8-ef8f343bac76</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="86885" url="~/f/nordic-q-a/72577/speeding-up-esb-on-nrf52"]These packets are sent with setting noack=true on the transmitter, but there is a heartbeat packet that requires an ACK at 1 Hz[/quote]
&lt;p&gt;NRF_ESB_LEGACY_CONFIG sets&amp;nbsp;selective_auto_ack=false, so noack is ignored, and all packets are therefore acked.&lt;/p&gt;
[quote userid="86885" url="~/f/nordic-q-a/72577/speeding-up-esb-on-nrf52"]&lt;p&gt;Edit: I&amp;#39;ve found that it takes about 350 us between when nrf_esb_write_payload is called, and when NRF_ESB_EVENT_TX_SUCCESS is received. That would suggest a maximum packet rate of 2.85 kHz, right?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Yes, that sounds about right with your configuration and the ESB implementation in the nRF 5SDK.&lt;/p&gt;
&lt;p&gt;The time it takes to transmit, receive and process a packet can be broken down as follows:&lt;/p&gt;
&lt;p&gt;- Radio ramp up&lt;br /&gt;- The on-air time of the packet&lt;br /&gt;- The transmission delay of the packet (negligible at short range since the radio waves move at the speed of light)&lt;br /&gt;- The processing delay in the receiver&lt;/p&gt;
&lt;p&gt;For compatibility reasons the default radio ramp up time is 130us, which is identical with older ESB radios such as the nRF24L01+.&amp;nbsp;In the nRF52 and later radios there is a faster ramp up available taking the ramp up time down to 40us, but you need to enable it explicitly in order to take advantage of it.&amp;nbsp; As far as I can see, the ESB library in the nRF5 SDK always disables the radio after a packet is transmitted, so the radio needs to ramp-up for each packet sent.&amp;nbsp;In the old SB(Shockburst) mode you might be able to send several packets back-to-back (which means you don&amp;#39;t have to use 130 us powering up the radio), but at least on the nRF24LE1 you still need to enter standby mode at least every 4ms, or the TX could stop working due to PLL drift (from page 19 in the nRF24LE1 PS).&lt;/p&gt;
[quote userid="86885" url="~/f/nordic-q-a/72577/speeding-up-esb-on-nrf52"]sending packets at 30 kHz[/quote]
&lt;p&gt;So that means a new packet each&amp;nbsp;33.33333 us...&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s take the smallest possible ShockBurst packet(SB only supports 1Mbps): (ESB also have a 9 bit packet control field)&lt;br /&gt;1 byte preamble, 3 byte address, 1 byte payload ,1 byte CRC = 6 byte -&amp;gt;&amp;nbsp;6*8 = 48 bits. &lt;br /&gt;Time to transmit packet = 48 bits / 1 Mbps = 48 us..... this is with a 1 byte payload...+ you will spend a couple of us on&amp;nbsp;&lt;span&gt;processing as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We can also take an Enhanced ShockBurst&amp;nbsp;example,&amp;nbsp;as&amp;nbsp;an example, if you use 1 byte preamble, 5 byte address, 9-bit PCF field, 8 byte payload and 2 byte CRC in 2Mbps bitrate mode you get a total on-air time of about 70us.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>