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,

    I think I understand. You want to send data from PRX to PTX. What you can do is to send a payload with the ACK using the command "W_ACK_PAYLOAD". You need to set the registers posted here to enable that command: https://devzone.nordicsemi.com/index.php/nrf24l01-dynamic-payload-configuration-without-ack#reply-4890

    Note that this is only triggered when the PRX receives a packet on the same PIPE that the PRX uploaded it to. Ex: PRX uploads 10 bytes to the FIFO on PIPE1 PRX receives a packet on PIPE0, empty ACK is sent PRX receives a packet on PIPE1, ACK + 10 byte payload is sent.

    You can read more about this in the nRF24L01+ datasheet (chapter 7.8.5 and the register map).

    Best regards Håkon

  • Hi Hakon,

    I am using exactly this command W_ACK_PAYLOAD to load the payload into the FIFO and I am following the datasheet recommendations as well.

    Only the PTX6 ( on PIPE0 ) returns an ACK ( showed on the diagram extracted from the datasheet) All others PTX won't return an ACK even they have been received successfully "Hello" msg from the PRX

    Actually is it possible to do bi-di communication in MultiCeiver mode + AA enabled at all?!? Or maybe the PRX can actual ONLY as receiver?!?

    Best Regards, Ivo Milev

  • Hi Ivo,

    I think you are misunderstand some concepts about what ACK is and what ACK-Payload is.

    If you get a interrupt "TX_DS", this means that your PTX has received an ACK (empty packet) from the PRX. If you get an interrupt "RX_DR", this means that you have received a packet.

    The PTX will never return an ACK. This is only a feature of the PRX.

    Note that the FIFO is 3 level deep, this means that you can only have 3 packets in the TX FIFO at once. Also note that the PRX will differentiate to which PIPE this ACK-payload is uploaded to. You must check the FIFO_STATUS register to determine if you have enough space to upload a new payload.

    Best regards Håkon

  • Hi Hakon,

    I think you misunderstand my problem. In my case, at one moment the PRX acts as "PTX" and the "PTX3" device acts as PRX. This is the way to do bidirectional communication and not only one way ( i.e PTX3 to send to PRX ).

    And I will repeat - If I communicate with PTX6 ( which is on PIPE0) I succesfully observe TX_DS interrupt Could you please explain why it is happen , why only on PIPE0 I am observing TX_DS

    On all other PIPES the data is recieved successfully but no ACK is returned ( TX_DS not asserted) and MAX_RT is asserted instead of that - i.e. exactly as Fred's issue. I am sending all data bytes in the payload ( which was the Fred's issue) so that is not my issue.

    I added diagram for better understanding of my case

    Best Regards, Ivo Milev

    nrf24L01.pdf

  • I am sorry for misunderstanding your application. The PRX seems to act as a "PTX" in your attached diagram.

    What you should then do is to use PIPE0 instead of PIPE1 on the device labeled "PRX", as it is now configured as a PTX device.

    Every device that is configured to be a PTX device (ie: has PRIM_RX in CONFIG register set to '0') must have TX_ADDR and PIPE0 address set equal for the hardware ACKing to work.

    Best regards Håkon

Related