Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK v15.2.0 :: Enhanced ShockBurst :: Head's up on a bug in nrf_esb.c

Hi

This is just a head's up.

In function nrf_esb_pop_tx(void) you have the following code ...

 

    if (--m_tx_fifo.entry_point >= NRF_ESB_TX_FIFO_SIZE)
    {
        m_tx_fifo.entry_point = 0;
    }

Instead it should be the following...

    if (m_tx_fifo.entry_point == 0)
    {
        m_tx_fifo.entry_point = (NRF_ESB_TX_FIFO_SIZE-1);
    }
    else
    {
        m_tx_fifo.entry_point--;
    }

Otherwise the bug is such that the packet that was 'deleted' is still sent and after that it all goes out of sequence


Kind regards
Mahendra

Parents Reply Children
No Data
Related