This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf23L01+ lost ACK payload packets

I am a bit confused about what happens to ACK_PLD when ack payload packets are lost. I am assuming that in case of ack payload packet loss MAX_RT bit in STATUS is set.

However, beyond that, is failed ack payload packet then cleared from ACK_PLD, or does it stay there and a retransmit will be attempted when MAX_RT is cleared?

Also, I am not 100% clear on the relationship between ACK_PLD and TX_EMPTY bit in FIFO_STATUS: does ACK_PLD data affect TX_EMPTY

Parents
  • Hi,

    ACK_PLD is the internal buffer which is filled by SPI command "W_ACK_PAYLOAD". If you have filled the TX FIFO with one payload (regardless of ACK-payload or normal payload), the TX_EMPTY bit in the FIFO_STATUS register will be '0'.

    An ACK-payload is uploaded using the SPI command "W_ACK_PAYLOAD", which is written into the nRF just as a normal payload. MAX_RT is an interrupt that only a transmitter will see. A device configured as a receiver will not see this interrupt.

    The problem with an ACK payload is that you will not get an ACK on the ACK-payload (weird sentence, I know). How this is handled inside the radio state machine is that there is a PID field which is a 2 bit counter. This counter will increment for each new packet so that the receiver can will be able to interpret a new packet from a re-transmission. This way, the ACK payload will give the receiver a "TX_DS" interrupt, however; the TX_DS signal will only occur on the next payload:

    • PTX sends payload #1
    • PRX receives, and sends ACK-payload

    In this scenario, the PRX does not know if the ACK-payload was successfully. On the next payload sent, this will happen:

    • PTX sends payload #2 and PID counter is incremented.
    • PRX receives, both "RX_DR" and "TX_DS" will be set in the STATUS register.

    If the PTX lost the ACK-payload from the PRX, the PTX will send a re-transmit which the PRX will interpret and re-send the ACK-payload.

    The PRX will only forget the ACK-payload once the PID field has incremented (the next PTX payload) and reports "TX_DS" up to the application, meaning that the PTX has successfully received the previous ACK-payload.

    Hope this makes sense.

    Cheers, Håkon

  • Thanks for the info Håkon. Our system seems to be missing a lot of ack packets. Our boards were populated in china, so this makes me suspect that they gave us fake knockoff radios that don't deal with ack packets correctly. Is there any way to check whether the PRX is properly checking packet IDs and re-transmitting lost ack packets?

Reply Children
No Data
Related