<?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>[bug report] Shockburst sends wrong acknowledge payload</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58883/bug-report-shockburst-sends-wrong-acknowledge-payload</link><description>Hello, 
 I have found a bug within the current (and earlier) release of the NRF SDK. 
 I have a project where I am using ESB to communicate. There is a primary transmitter sending data, and a primary receiver receiving this data. The primary receiver</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Mar 2020 13:23:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58883/bug-report-shockburst-sends-wrong-acknowledge-payload" /><item><title>RE: [bug report] Shockburst sends wrong acknowledge payload</title><link>https://devzone.nordicsemi.com/thread/239120?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 13:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b3bd65e-eae9-4db6-a6ae-8c8f76b3a53b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Thanks for your feedback. I have bumped the internal report and added a link to your proposed fix.&lt;/p&gt;
&lt;p&gt;I will check with the developers if this can be fixed for a future release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [bug report] Shockburst sends wrong acknowledge payload</title><link>https://devzone.nordicsemi.com/thread/239109?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 12:57:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05a82b5a-15d2-4c4a-b904-481d0450fafe</guid><dc:creator>Yannick_Alflex</dc:creator><description>&lt;p&gt;Dear&amp;nbsp;J&amp;oslash;rgen,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is indeed the correct issue. The proposed fix does however not solve my issue. The proposed fix is in fact flawed as well. In the proposed fix, the fifo exit point is incremented before checking pipe and payload, causing the exit point to be 1, and will still cause an empty acknowledge being sent.&lt;/p&gt;
&lt;p&gt;In the meantime I have implemented my own fix. This fix works for my use case. The fix is, as mentioned earlier, to not prematurely increment the exit point.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The following code is part of the&amp;nbsp;on_radio_disabled_rx() function, in nrf_esb.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&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)
           )
        {

            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);

            p_pipe_info-&amp;gt;ack_payload = true;
            // 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;
            }
        }
        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;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why was this not fixed in the latest release of the SDK? This issue is nearly 3.5 years old, and the previous &amp;quot;r&lt;span&gt;elease of the nRF5 SDK was limited in scope&amp;quot; does not apply, as the latest release was a major update.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [bug report] Shockburst sends wrong acknowledge payload</title><link>https://devzone.nordicsemi.com/thread/239088?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 12:00:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7df0b1e2-44de-41b2-8321-695f8255807f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This looks similar to the issue described in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27042/esb-on-nrf52-sdk11-not-sending-ack-payloads/106190#106190"&gt;this post&lt;/a&gt;. Can you check if the proposed changes fix the issue you are seeing?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>