kicking up a bug on an older nrf24 board.

I have a product that has a bug and I'm forced to go thru some older code. This was the nrf24 plus chip. The code still runs fine, and most of the function I created do all the requires steps but in an effort to narrow down problem I just can not really recall how this thing works.

if needed I can include the details in the function but I know this stiff works so trying to keep it a bit sort,. Here is some example code

enable();
sendCommand(0x60);
returnPayloadSize = sendCommand(0x00);//get payload size.
disable();   

checkSum=0;
enable();
sendCommand(0x61);//read data
memset(returnNrf2Payload, 0,returnPayloadSize);
for (unsigned char d = 0; d < returnPayloadSize; d++)     
{
            returnNrf2Payload[d]=sendCommand(0x00);
            if (d < (returnPayloadSize-1) ) checkSum ^= returnNrf2Payload[d]; //all but last.
}
disable();

that code work fine, I get my size and data comes in. Strangely my data is all zeros but that is not my main confusion.

If  do this

enable();
sendCommand(0x60);
var1 = sendCommand(0x00);
disable();
enable();
sendCommand(0x61);    
var2 = sendCommand(0x00);    
disable();

var 1 and 2 are the same as they were before, but according to the data sheet  "Payload is deleted from
FIFO after it is read" /so that can not be? I thought there was a buffer for multiple rx in but I also tried to flush and clear the rx flag, still the data persists.

Parents
  • just noticed something strange . On my receiver I see a TX_FULL flag.

    the way it works

    sender sends a command (i.e 1) then a 0xFF to pick up the burst

    receiver is always watching for command and sets the ACK data  when it gets a command.

    so I noticed on my receiver  there is a TX_FULL  bit on. Every time I read the command that comes in, I always do a write to 0x20 and a flash. So I'm not sure how it could be full?

Reply
  • just noticed something strange . On my receiver I see a TX_FULL flag.

    the way it works

    sender sends a command (i.e 1) then a 0xFF to pick up the burst

    receiver is always watching for command and sets the ACK data  when it gets a command.

    so I noticed on my receiver  there is a TX_FULL  bit on. Every time I read the command that comes in, I always do a write to 0x20 and a flash. So I'm not sure how it could be full?

Children
No Data
Related