0

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

suker.su gravatar image

asked 2017-08-10 11:28:57 +0100

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

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
1
ovrebekk gravatar image

answered 2017-08-11 16:14:02 +0100

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

edit flag offensive delete publish link more

Comments

Hi , in ESB example, in PRX code , function on_radio_disabled_rx, I donot find which code is fuction to sent ACK. Is ACK have to put NRF_RADIO->TASKS_TXEN=1 ??

suker ( 2017-08-17 11:38:57 +0100 )editconvert to answer

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

Torbjørn Øvrebekk ( 2017-08-18 08:48:28 +0100 )editconvert to answer

thank you!

suker ( 2017-08-20 05:23:53 +0100 )editconvert to answer

You welcome :)

Torbjørn Øvrebekk ( 2017-08-21 13:25:23 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-08-10 11:28:57 +0100

Seen: 42 times

Last updated: aug. 11