<?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>ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27042/esb-on-nrf52-sdk11-not-sending-ack-payloads</link><description>I&amp;#39;m trying to set up an ESB PRX on an nRF52 that has to communicate with an nRF24L01 chip acting as PTX. Because I want to react to the received data as quickly as possible, I tend to call nrf_esb_flush_tx() before writing a new payload into the TX FIFO</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Mar 2019 18:37:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27042/esb-on-nrf52-sdk11-not-sending-ack-payloads" /><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/174376?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 18:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b239919-07d0-40e8-bbad-a905e84ef734</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The 15.3 release of the nRF5 SDK was limited in scope, so unfortunately this is among the several things that was not prioritized.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/174351?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 16:11:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:513db4b1-5c05-4365-96cc-bdc7d6664ebb</guid><dc:creator>mthomas</dc:creator><description>&lt;p&gt;Any reason why this isn&amp;#39;t fixed in SDK 15.3.0 yet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/169265?ContentTypeID=1</link><pubDate>Mon, 04 Feb 2019 10:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44261666-7bbe-41c2-85ce-80cc257f6776</guid><dc:creator>m.wagner</dc:creator><description>&lt;p&gt;Well, I just made a buffer for each pipe which holds the ACK-Payload for the respective pipe, and created two additional functions to access this buffer externally.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t nrf_esb_preload_ack(uint8_t pipe, const uint8_t *p_data, uint8_t len);
uint32_t nrf_esb_flush_ack(uint8_t pipe)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Last but not least, I had to modify &lt;em&gt;on_radio_disabled_rx&lt;/em&gt; to use my ACK-payload buffer instead of the original FIFO. Unfortunately, I can&amp;#39;t share this code as I had to do a tonne of additional modifications to the ESB-library for it to properly work in my scenario-&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/169227?ContentTypeID=1</link><pubDate>Mon, 04 Feb 2019 08:25:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81800277-8ce1-4c13-8f06-96b364fe1088</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not have any more information that what is in this thread. The &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27042/esb-on-nrf52-sdk11-not-sending-ack-payloads/106190#106190"&gt;suggested fix&lt;/a&gt;&amp;nbsp;by &lt;a href="https://devzone.nordicsemi.com/members/ecejeff"&gt;ECEJeff&lt;/a&gt; is valid and can be used with later SDKs.&lt;/p&gt;
&lt;p&gt;This has not yet been fixed in the SDK, as it slipped through the system because of a mishap on my part. I have bumped it again so that it can hopefully be fixed in a future release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/169197?ContentTypeID=1</link><pubDate>Sun, 03 Feb 2019 23:12:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1ff0e12-6229-45c2-8cac-b44a1688619e</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Can you clarify in what case this bug occurs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/169196?ContentTypeID=1</link><pubDate>Sun, 03 Feb 2019 23:09:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6766fc5c-5628-4808-9655-eaf18d00086a</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Would you mind to share how had you done that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/119694?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 09:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fb8846a-65f6-4367-8949-13b0856a5365</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You are absolutely right that this is a bug in the ESB library.&amp;nbsp;Unfortunately, it has not been fixed in the SDK yet, but I will bump this issue internally.&lt;/p&gt;
&lt;p&gt;Your modifications seem valid, and can hopefully be useful for others until the SDK incorporates a fix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/106190?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2017 20:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb86af8c-a1a9-4b57-9db6-58b51f9805ef</guid><dc:creator>ECEJeff</dc:creator><description>&lt;p&gt;Just experienced this myself today. Looks like the ESB library has a bug.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s how I solved the issue: I changed the following code (starting line 773 nrf_esb.c in SDK 14.1.0):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;        case NRF_ESB_PROTOCOL_ESB_DPL:
            {
                if (m_tx_fifo.count &amp;gt; 0 &amp;amp;&amp;amp;
                    (m_tx_fifo.p_payload[m_tx_fifo.exit_point]-&amp;gt;pipe == NRF_RADIO-&amp;gt;RXMATCH)
                   )
                {
                    // Pipe stays in ACK with payload until TX FIFO is empty
                    // Do not report TX success on first ack payload or retransmit
                    if (p_pipe_info-&amp;gt;ack_payload == true &amp;amp;&amp;amp; !retransmit_payload)
                    {
                        if (++m_tx_fifo.exit_point &amp;gt;= NRF_ESB_TX_FIFO_SIZE)
                        {
                            m_tx_fifo.exit_point = 0;
                        }

                        m_tx_fifo.count--;

                        // ACK payloads also require TX_DS
                        // (page 40 of the &amp;#39;nRF24LE1_Product_Specification_rev1_6.pdf&amp;#39;).
                        m_interrupt_flags |= NRF_ESB_INT_TX_SUCCESS_MSK;
                    }

                    p_pipe_info-&amp;gt;ack_payload = true;

                    mp_current_payload = m_tx_fifo.p_payload[m_tx_fifo.exit_point];

                    update_rf_payload_format(mp_current_payload-&amp;gt;length);
                    m_tx_payload_buffer[0] = mp_current_payload-&amp;gt;length;
                    memcpy(&amp;amp;m_tx_payload_buffer[2],
                           mp_current_payload-&amp;gt;data,
                           mp_current_payload-&amp;gt;length);
                }
                else
                {
                    p_pipe_info-&amp;gt;ack_payload = false;
                    update_rf_payload_format(0);
                    m_tx_payload_buffer[0] = 0;
                }

                m_tx_payload_buffer[1] = m_rx_payload_buffer[1];
            }
            break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;        case NRF_ESB_PROTOCOL_ESB_DPL:
            {
            	// Pipe stays in ACK with payload until TX FIFO is empty
				// Do not report TX success on first ack payload or retransmit
				if (p_pipe_info-&amp;gt;ack_payload == true &amp;amp;&amp;amp; !retransmit_payload)
				{
					if (++m_tx_fifo.exit_point &amp;gt;= NRF_ESB_TX_FIFO_SIZE)
					{
						m_tx_fifo.exit_point = 0;
					}

					m_tx_fifo.count--;

					// ACK payloads also require TX_DS
					// (page 40 of the &amp;#39;nRF24LE1_Product_Specification_rev1_6.pdf&amp;#39;).
					m_interrupt_flags |= NRF_ESB_INT_TX_SUCCESS_MSK;
				}

                if (m_tx_fifo.count &amp;gt; 0 &amp;amp;&amp;amp;
                    (m_tx_fifo.p_payload[m_tx_fifo.exit_point]-&amp;gt;pipe == NRF_RADIO-&amp;gt;RXMATCH)
                   )
                {
                    p_pipe_info-&amp;gt;ack_payload = true;

                    mp_current_payload = m_tx_fifo.p_payload[m_tx_fifo.exit_point];

                    update_rf_payload_format(mp_current_payload-&amp;gt;length);
                    m_tx_payload_buffer[0] = mp_current_payload-&amp;gt;length;
                    memcpy(&amp;amp;m_tx_payload_buffer[2],
                           mp_current_payload-&amp;gt;data,
                           mp_current_payload-&amp;gt;length);
                }
                else
                {
                    p_pipe_info-&amp;gt;ack_payload = false;
                    update_rf_payload_format(0);
                    m_tx_payload_buffer[0] = 0;
                }

                m_tx_payload_buffer[1] = m_rx_payload_buffer[1];
            }
            break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This moves the completion code outside of the check for new packets to send. The SDK&amp;#39;s code would send uninitialized data from the FIFO, which usually worked, but sometimes failed disastrously.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a pretty serious bug that in practice makes PRX ACK payloads unusable. Hopefully someone from Nordic will see this post and incorporate the fix into the next SDK release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/106189?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2016 05:39:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:764c0c24-4d1e-4ff7-b418-c9eb5cb37a64</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Thanks for reporting this issue. I have forwarded it internally in Nordic, so that hopefully it can be fixed in a future SDK release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/106188?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 06:37:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f71c1544-c762-4496-b060-2e477e7c3c33</guid><dc:creator>m.wagner</dc:creator><description>&lt;p&gt;I modified the ESB driver to not use a FIFO in my use case. Instead, I preload one payload per pipe which keeps being sent as an ack payload (even on retransmissions) as long as it is not replaced or explicitly cleared.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB on nRF52 SDK11: not sending ACK payloads</title><link>https://devzone.nordicsemi.com/thread/106187?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 05:48:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a738a5e-8f21-41ee-b175-3720df6f9bbd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Have you had any progress on this issue? It seems like a problem in the case where you flush the TX FIFO and use ACK payload, which is something I don&amp;#39;t think we have tested.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>