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

Issue w/ nRF24L01 Tx

I am having an interesting issue trying to send packets. Only a very small number are being received (~1 per second even when transmitting one after another), and they are only partially correct (receiving 0x9DAFAAAA when transmitting 0xAAAAAAAA).

Additionally, if I try and change the payload being set (e.g. from 0xAAAAAAAA to 0xBBBBBBBB) nothing happens unless the nRF24L01 is restarted.

Is there something obvious I could be missing to cause this behavior? The Rx and Tx addresses appear to get set correctly (w/ Rx_P0 set to the same address as Tx)and the payload size is being set to 4 bytes.

Has anyone else had behavior like this?

(Using an Arduino for Rx and an STM32F4 Discovery board for Tx - I have no issues using the Arduino for Tx and the STM32 for Rx)

Parents
  • Hi Bryan,

    From the files that you've attached, I cannot see something that stands out. However, you are clearing the STATUS register with a constant. It is recommended that you read out the register and write back the read-content, to make sure you clear the correct bits.

    Given that you need to reset the nRF to be able to change your payload (on the STM?), this indicates that there's something wrong in the handling when switching from RX->TX. Try avoiding high delays (ms-range and higher), and setup a pin-interrupt on the IRQ pin from the nRF.

    Also, you can try to cut down the program, and verify that things work one step of the time. Start with a simple transmitter (no RX) on the STM side, and when you've verified that this works, add more functionality.

    Best regards Håkon

Reply
  • Hi Bryan,

    From the files that you've attached, I cannot see something that stands out. However, you are clearing the STATUS register with a constant. It is recommended that you read out the register and write back the read-content, to make sure you clear the correct bits.

    Given that you need to reset the nRF to be able to change your payload (on the STM?), this indicates that there's something wrong in the handling when switching from RX->TX. Try avoiding high delays (ms-range and higher), and setup a pin-interrupt on the IRQ pin from the nRF.

    Also, you can try to cut down the program, and verify that things work one step of the time. Start with a simple transmitter (no RX) on the STM side, and when you've verified that this works, add more functionality.

    Best regards Håkon

Children
No Data
Related