NRF52 - ESB - Receiving duplicate packets

We are having some issues with ESB, it seems the automatic ACKs are not working properly and we get spammed with a lot of duplicates.

We believe the issue is because we start some function immediately when NRF_ESB_EVENT_RX_RECEIVED is triggered and because of this it doesn't have time to send an ACK.

How can we delay without blocking the CPU before starting our function?

This seems to work but is it the best way?

//event triggered

for(int i=0; i<50; i++){
nrf_delay_us(10);
}

//start function

Parents Reply
  • I am not entirely sure I understand your tx, it seems the chunk_size is 32bytes, but you are only sending 21bytes? Are you sure you are not just sending the start of the *data array several times? How do you ensure len is not larger than 32bytes? Does nrf_esb_write_payload() return any error?

    Edit: Wait a sec, are you calling esb_tx() several times here with the same packet (that is 21bytes)? Is that the duplicate you see?

    Kenneth

Children
Related