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

How to test Bidirectional data transfer between each PTX and the PRX

1,NRF52832 2,use ESB code 3,I want to do a transport data from PRX to PTX

Parents
  • Hi

    You send data from the PRX to the PTX in almost the same way as you send data from the PTX.

    You use the same function, but you have to pre-load the packet to be sent. Then the packet will be sent to the PTX as a part of the ACK on the next packet the PTX sends to the PRX.

    If you upload the packet beforehand it will simply be queued in the FIFO, and then it will be sent as soon as you receive something from the PTX.

    If you use the SDK ESB example as a starting point it should be relatively quick to modify it so that the PRX sends data in return to the PTX.

    Best regards
    Torbjørn

  • Hi

    The ESB code uses shortcuts to automate many of the radio state changes, to reduce the amount of CPU wakeups and interrupts.
    When sending an ACK it will enable both the DISABLED->TXEN shortcut, to enable the TX automatically after disabling the radio in RX mode, as well as the READY->START shortcut, to start transmission as soon as the radio is ready.

    In other words there shouldn't be a manual call to NRF_RADIO->TASKS_TXEN = 1 to send the ACK (since the shortcut automates the process), but you can see the configuration of the SHORTS register before disabling the radio.

    Best regards

Reply
  • Hi

    The ESB code uses shortcuts to automate many of the radio state changes, to reduce the amount of CPU wakeups and interrupts.
    When sending an ACK it will enable both the DISABLED->TXEN shortcut, to enable the TX automatically after disabling the radio in RX mode, as well as the READY->START shortcut, to start transmission as soon as the radio is ready.

    In other words there shouldn't be a manual call to NRF_RADIO->TASKS_TXEN = 1 to send the ACK (since the shortcut automates the process), but you can see the configuration of the SHORTS register before disabling the radio.

    Best regards

Children
No Data
Related