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

NRF24L01+ working irregulary

Hi everyone,

I bought two NRF24L01+ off ebay a couple of week ago and started to work on them this week. I seem to have problem with establishing a reliable communication between both devices. I enabled Shockburst by setting register EN_AA all to "1" and register EN_RXADDR all to "1". I should then have auto-acknowledgement on the TX device. Both device work with the IRQ pin with external interrupt on my two MCU (ATMEGA8) and interrupt are masked with the STATUS register to show what interrupt is trigerred by the NRF. I seem to have a bad communication, but the packet still cross from the TX to the RX irregularly. I checked the value of the received packet and it is the same as the one sent., but no acknowledge received in the TX device...

Any fast thoughts on why it would do this?

Thanks, Fred

  • Hi, thanks a lot for the reply. unfortunately, I wasn't able to get the two NRF24L01+ working with Shockburst Technology. I just disabled the Auto-Acknowledgement and it is now working fine. Guess I will have to do the Acknowledgement myself, but it is not an issue for the project that I'm working on. With the register EN_AA = 0b00000000, both devices work perfectly and have an 99% if not 100% rate.

    Thanks again for the help, Fred

  • Auto-acking should be enabled by default, so you should be able to use ACKing when EN_AA is untouched.

    Note that the TX address and PIPE0 address must be equal on your PTX device in order to get ACKing working. Have you set these?

  • Yes I have set TX_ADDR = to RX_ADDR_P0, but I was not able to received an acknowledge... The MAX_RT bit was always set, meaning that the maximum retries was reached. I tried to put the maximum retries to its maximum, but it did not change anything,

  • I just discovered that I had strange behaviors in my circuit. I noticed that when my programmer (AVR dragon) was plugged via ISP (In system programming) to program my microcontroler (ATMEGA8), I had roughtly 4% to 5% of datalost. When I unplugged the wire, I got it down to about 0,20% of packet lost. I assume that this problem cause the NRF24L01+ to have difficulty changing from RX to TX mode. I will try to rewrite the code to use Auto-Ack and unplugged my ISP wire and see if this was the problem. I will keep you posted

    Fred

  • Update on my situation, I was still unable to use Auto-Ack. To test it i took my code without Auto-Ack and, enabled Auto-Ack on pipe 0 and pipe 1, and set RX_ADDR_P0 = to TX_ADDR in the TX device. Nothing was working so I decided to test both module individualy. For the TX device: When I enable Auto-Ack, the data received by the RX device is not the one I sent with the TX device. I was supposed to send 'F','R','E','D', 4 bytes. With Auto-Ack disable, I received exactly what I send. When I just changed two bites in the register EN_AA, data becomes unreadable. For the RX device: When I enable Auto-Ack, I receive no data at all. When I disable Auto-Ack, I receive data with less than 0.5% of error. I did not found a solution to this problem so as I said, I will do the acknowledgement myself this is not an issue. Thanks anyway for the help, but I can't keep wasting time on trying to make it work the project must go on. Special thanks to Hakon, which solve some of my problem and made it work to let's say 95%.

    Fred

Related