Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nRF52840 dongle & nRF24L01 Pipe Config

Hi,

I'm confused about ESB settings. I'm trying to renew our board with new nRF520840 chip and we must need to provide backward compatibility that the existing board has nRF24L01.

In the ESB example of NRF5 SDK the pipe settings is set by:

static struct esb_payload tx_payload = ESB_CREATE_PAYLOAD(0, 0x01, 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08);

As I understand from the function definition Red is the pipe index, blue is the data size, greens are the pipe bytes. Is it correct?

In our nRF24 application the pipe settings are like below:

const uint64_t pipes[2] = { 0xABCDEFABCDLL, 0xAABBCCDDEELL };  // pipe[0] is for RX, pipe[1] is for TX
Data size Is 24 bytes. So do I need to set "blue" parameter to 24?
Is there only one pipe for both transmitting and receiving in new SDK (ESB)?
Look like new SDK is require 7 pipe bytes if I'm correct. How can I set 5 byte pipe number? Is it like ESB_CREATE_PAYLOAD(0240xAA, 0xBB, 0xCC, 0xDD, 0xEE);  ?
Thanks in advance.
Parents
  • Hi Salih

    I will help Markus out with this case as I have more experience with the ESB protocol. 

    As I understand from the function definition Red is the pipe index, blue is the data size, greens are the pipe bytes. Is it correct?

    The red value is the pipe index, that is correct, but there is no data size parameter. The macro sets the size according to how many bytes you include after the pipe index (8 bytes in this case). 

    Data size Is 24 bytes. So do I need to set "blue" parameter to 24?

    No. As I mentioned earlier the ESB_CREATE_PAYLOAD macro doesn't take the size as an argument. 

    In your case I would probably just populate the fields of the tx_payload struct directly, rather than use the ESB_CREATE_PAYLOAD macro. This macro is only meant as a utility macro to make it easy to define simple ESB payloads for the ESB samples, but is impractical to use in most applications where the payload content is dynamically rather than statically defined. 

    Is there only one pipe for both transmitting and receiving in new SDK (ESB)?

    No, you can both receive or transmit on any pipe. 

    Look like new SDK is require 7 pipe bytes if I'm correct. How can I set 5 byte pipe number? Is it like ESB_CREATE_PAYLOAD(0240xAA, 0xBB, 0xCC, 0xDD, 0xEE);  ?

    I assume what you are referring to here is the RF address. The new ESB library allows you to use 3, 4 or 5 byte RF address, similar to the old nRF24L01 implementation. 

    Just keep in mind that setting the RF address has to be done separately, as shown in the standard ESB samples. 

    Also, addresses are handled differently between the nRF24L series radios and the nRF5 series radios, as described in more detail here

    Best regards
    Torbjørn

Reply
  • Hi Salih

    I will help Markus out with this case as I have more experience with the ESB protocol. 

    As I understand from the function definition Red is the pipe index, blue is the data size, greens are the pipe bytes. Is it correct?

    The red value is the pipe index, that is correct, but there is no data size parameter. The macro sets the size according to how many bytes you include after the pipe index (8 bytes in this case). 

    Data size Is 24 bytes. So do I need to set "blue" parameter to 24?

    No. As I mentioned earlier the ESB_CREATE_PAYLOAD macro doesn't take the size as an argument. 

    In your case I would probably just populate the fields of the tx_payload struct directly, rather than use the ESB_CREATE_PAYLOAD macro. This macro is only meant as a utility macro to make it easy to define simple ESB payloads for the ESB samples, but is impractical to use in most applications where the payload content is dynamically rather than statically defined. 

    Is there only one pipe for both transmitting and receiving in new SDK (ESB)?

    No, you can both receive or transmit on any pipe. 

    Look like new SDK is require 7 pipe bytes if I'm correct. How can I set 5 byte pipe number? Is it like ESB_CREATE_PAYLOAD(0240xAA, 0xBB, 0xCC, 0xDD, 0xEE);  ?

    I assume what you are referring to here is the RF address. The new ESB library allows you to use 3, 4 or 5 byte RF address, similar to the old nRF24L01 implementation. 

    Just keep in mind that setting the RF address has to be done separately, as shown in the standard ESB samples. 

    Also, addresses are handled differently between the nRF24L series radios and the nRF5 series radios, as described in more detail here

    Best regards
    Torbjørn

Children
No Data
Related