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:
- Put first payload to TX buffer,
- Check if RX_DR fired in loop,
- If RX_DR fired,
- Set CE to low,
- Get payload length,
- Read payload,
- If payload is correct, flush TX and put new payload to TX buffer,
- 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?