This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't get TX_DS interrupt on PRX side (ACK payload)

Hi,

I have some problem. My code was working and everything was fine, but I decided to improve my program. I made some changes, and now TX_DS interrupt on PRX side doesn't fire. :(

From the beginning:

PTX side: this side is sending some packet to PRX side, all the time. But to check if packet was sent correctly, besides Shockburst auto-acknowledge, I need to get some payload from PRX side (something like time-synchro packet). It works, on this side. ;) But...

PRX side: this side is always ready to get data and immediately send payload with ack packet. I mean, in TX FIFO is always one packet written with W_ACK_PAYLOAD. When PRX get some packet, ACK payload is sent immediately.

Back to PTX side: TX_DR fire, RX_DR fire, packet sent correct and everything looks great. Now PTX side is sending second packet (A2), in order to PRX side can check if ack payload was sent correctly.

Back to PRX side: PRX side gets second packet (A2), but.. TX_DS doesn't fire!

What can be a reason of this behave?

Configuration is correct, i'm sure. Everything was working correctly earlier, and configuration section wasn't change. I changed only rutine. Routine on PRX side, for now looks like:

  1. Put first payload to TX buffer,
  2. Check if RX_DR fired in loop,
  3. If RX_DR fired,
  4. Set CE to low,
  5. Get payload length,
  6. Read payload,
  7. If payload is correct, flush TX and put new payload to TX buffer,
  8. Check if RX buffer is empty: if is, back to main loop, else, get new payload (never happened).

PTX side is so easy, it doesn't make sense to describe this routine (send, check TX, check RX, send second packet, and so on.

Well: what can be a reason, that TX_DS inerrupt doesn't fire, although PTX side receive ACK payload?

  • Usually when you don't see a TX_DS or RX_DR interrupt it either isn't received/sent at all or the payload is static and the receiver of either the original packet or the ACK discard the payload as re-transmit. Add a counter byte to the payload to make sure the payload isn't static.

    Make sure that the original packet/ACK is actually sent by monitoring the VDD_PA pin on the nRF24L01+. This pin will go up to 1.8 V for as long as the chip is in TX mode. So you should see it rise to 1.8 V on both the PTX and PRX. See if they match up and the pattern makes sense.

    Could it be that during the writing of a new ACK payload you get interrupted by a new incoming packet and hence never complete writing the ACK payload? You could verify this by delaying the TX operation on the PTX, at least for testing.

Related