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

  • UPDATE!! Now working, the problem was that I was setting the RX payload size to 5 bytes and that I was only sending 3 bytes at a time! Working perfeclty now! I just wanted to write it for future people Thanks

  • Hi All,

    I have a similar issue like Fred's issue (data sent but ACK not recieved). I am getting ACK only for data pipe 0. And for all other data pipes I don't get an ACK from the PTX device with the exact same code that I used when I communicate on data pipe 0. The only difference is that I am changing the TX ADDR in the PTX device to match the corresponding data pipe RX ADDR in the PRX device + changing the TX ADDR in the PRX device to match RX ADDR in the data pipe 0 in corresponding PTX device. I don't have data loss on the air - all data transmitted/received successfully on all pipes. Also I tried several data air speeds and re-transmit settings. Please find attached the NRF24L01+ initilialize procedure that I am using.( define ESA_MASTER means PRX with all pipes enabled with AA and ESA_SLAVE means PTX with data pipe 0 enabled). Please note that for the PRX device I am changing the TX ADDR before I am sending data in other procedure, i.e you will not see that in the attached file. Please help, cause it is a really strange issue and I am not sure if it is in the firmware or in the hardware FSM in the nrf chip.

    Best Regards, Ivo Milev

    init.c

  • Hi Ivo,

    On the PRX side, the ACK will automatically be configured with address. Example: PRX receives on PIPE5, it will then automatically configure TXADDR equal to PIPE5, then send the ACK. You should not change the TXADDR manually when it's a PRX.

    However, on the PTX, this is not automatically configured. On the PTX you must set address on PIPE0 equal to TXADDR, if not it will not receive the ACK successfully and give you the TX_DS interrupt.

    I looks like you are doing this correctly and have understood this. Is it only PIPE0 that you get an ACK on, all other pipes does not send an ACK?

    Best regards Håkon

  • Hi Hakon,

    Thanks for the quick response!

    Yes, I am getting ACK only on PIPE0

    My understandings are that I must change the TX address in the PRX module when I would like to transmit to the corresponding PTX device, isn't it correct? Then the PTX device should return ACK to the PRX device if the transmission was successful (CRC passed). And I can confirm that the transmission was successful for all tested PIPEs , but I am getting ACK only from PIPE0 at PRX side.

    Please note that each PTX device got an ACK from the PRX , when PTX sent data to PRX.

    I am following the architecture in the attached image

    Best Regards, Ivo Milev

    multiceiver.png

  • You shouldn't change the PIPE0 address on the PRX, only on the PTX. So all PTX get "TX_DS" interrupt, but PRX does not get "RX_DR" interrupt? Is that correct?

    BR Håkon

Related