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

Problem reading the RPD bit correctly when Auto-Ack is turned ON.

Using NRF2401+, I have two units running side by side on the bench.

With Auto-Ack turned OFF I can successfully read the RPD register (bit 0) and get the expected readings of 1 or 0 depending on the distance between the two modules.

However, when I turn Auto-Ack ON, RPD only ever reads zero even at very short range.

I am certain the issue is down to my code, and the point at which RPD is read. It is being read when the RX_DR interupt occurs. Any help will be most appreciated thank you!

  • Hi,

    The RPD is latched at the end of a received packet and kept until you start a new receive window. In Auto ack mode, a new receive window will begin after sending an ACK as response to a received packet. This means that you'll have a short window from RX_DR gets set until RPD is cleared.

    Please review the timing for when you actually read RPD to see if this can be the case.

    Best regards,

    Jon Gunnar

  • Hello Jon,

    Thank you for your reply. I've tried reading the RPD register (with AutoACK turned ON) immediately when the RX_DR interrupt occurs (within 6 microseconds) but that does not work. When AutoACK is turned ON, perhaps the RX_DR interrupt bit is not set until the whole transaction is completed (i.e. the ACK is sent).

    I think the solution will be for change the coding of the TX such that from time to time it disables AutoACK (and instructs the RX to do the same) in order for a snapshot of the RPD to be taken. To be fair, as a solution this will work fine. I mainly want to see the RPD bit during development.

    many thanks,

    Andrew

  • Hi,

    At what data rate do you operate the chip? We have seen that the timing is very tight at lower data rates.

    The solution you describe sounds like a good idea if you are only using it during development and not as part of your protocol.

    Best regards,

    Jon Gunnar

  • Hi Jan,

    That's interesting: I am operating at the lowest data rate of 250k. It seems counter intuitive that the timing would be tighter at the lower data rate - so that's very interesting information from you. I will try over the weekend at the 2Mbps data rate and see if I am able to read the RPD bit with auto-ack turned on.

    Thanks again,
    Andrew

  • Hello Jan,

    Just to wrap this quesiton up from my side:

    You were absolutely correct (a) about the timing of reading RPD with AutoAck ON and (b) it being possible at the HIGHER air data rates.

    I have tried it on my development units at 2Mbps and 1Mbps air-rates, and it is possible to correctly read the RPD bit (with AutoAck turned ON). With no other variables, it continued to be impossible to read RPD at the lowest air-data rate of 250kbps.

    So while I wish to use the lowest air-data rate in my application (for best range/reliability), I now have the option of testing the RPD bit either by having the firmware switch up to a higher data rate or by temporarily disabling AutoAck.

    Thank you for all your help,

    Andrew

Related