nrf24l01 loosing packets

Hi

I’ve got NRF24L01 with PIC16F684 (trasmitter) and NRF24L01 with atmels at91SAM7s (receiver). I’ve seen that trasmitter is loosing packets. No matter if it works on 2Mbps or 1MBps. I’ve got view what i am receiving on windows hyper terminal. recevier sends it via usb (serial port) with 11520 kbps. I’ve also tried changing LNA Gain, retransmision speed and all of the things. Also i put a 10 ms delay between trasnmittision of next packet and it gave me nothing.

I have a trasmission which looks like that

while(1)

{

CONFIG_PIN_LED = 1;

CONFIG_PIN_LED1 = 1;

for (i = 0 ; i < 9 ; i ++)

{

txPayload[12] = i + 0x30 ;

SPI_write_buffer(0xA0,txPayload,16);

CONFIG_PIN_CE = 1;

status = SPI_read_reg(0x07);

if (status&0x20)

{

CONFIG_PIN_LED = 0;

SPI_write_reg(0x27,0x20);

SPI_send_byte(0xE1);

CONFIG_PIN_LED1 = 0;

}

// DelayMs(10);

}

Receiver shoud recieve packets from 0 to 9 (12nd pos in rxPayload), but it receives eg 1,4; 7,8; 1,6,9 etc…

thx in advance for help

Unfortunately, some packet losses are always going to happen. This is especially true if you’re operating your 24L01 modules near another 2.4 GHz source (WiFi, microwave, etc.). Layout of the board that the 24L01 is on is extremely important to getting good range, though. Is this a board you did yourself or is it one of the Sparkfun units?

I made board by myself, based on openbeacon.org schematics, i suppose, that layout can have an infulece to range, but on the other hand, if the reciver is placed 10 cm from transmitter, should be so many lost packets ??

You shouldn’t lose that many packets unless you have a poor board layout, there is a lot of 2.4 GHz noise around you, or both.

Did you copy the layout, or use your own?

Leon

if (status&0x20) 

This should be a “while()” of some sort. As coded, you’re pretty much

always recognizing a stale TX_DS indication, so depending on whether the

DelayMs is there, you’re flushing (destroying) either 1/2 or 2/3 of your

packets before they can be sent.

More generally, (though I’ve seen some disagreement about this), I would

say that, short of a full chip reset, you should never be flushing the Tx FIFO.

Is it possible to diagnose whats wrong with the layout using spectral analyzer ?

I think you need a network analyser, not a spectrum analyser. They are very expensive, but can be hired.

Leon

I suggest you start by fixing your code. The code you quoted will produce

the symptoms you describe.