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

NRF52 DK - Dynamic payload(DPL) and static payload.

I have an NRF24LE1 transmitter using ESB. It is sending a static payload of 10 bytes every sec. The other configurations on the transmitter are: RF channel:2, CRC: 1 byte, DataRate: 1MBPS.

I am trying to understand the given example code for esb_prx for NRF52-DK in NRF5 SDK 11.0. which I am using as Receiver.

It seem dynamic payload length - DPL is used as a default configuration. Can I use dynamic payload to talk to my current transmitter which has static payload ? What is dynamic payload mean, does it mean I can send any number of bytes to the Receiver? If so, payload_length field of nrf_esb_config_t in Receiver become irrelevant in DPL mode.

On a side question about esb_ptx in NRF52-DK:

#define NRF_ESB_CREATE_PAYLOAD(_pipe, ...)                                                  \
        {.pipe = _pipe, .length = NUM_VA_ARGS(__VA_ARGS__), .data = {__VA_ARGS__}};         \
        STATIC_ASSERT(NUM_VA_ARGS(__VA_ARGS__) > 0 && NUM_VA_ARGS(__VA_ARGS__) <= 63)

static nrf_esb_payload_t        tx_payload = NRF_ESB_CREATE_PAYLOAD(0, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00);

What will be the pipe number, length and data values using NRF_ESB_CREATE_PAYLOAD macro ? But nrf_esb_payload_t is defined as follows:

typedef struct
{
    uint8_t length;                             /**< Length of the packet. Should be equal or less than      
                                                        NRF_ESB_MAX_PAYLOAD_LENGTH. */
    uint8_t pipe;                                   /**< Pipe used for this payload. */
    int8_t  rssi;                                   /**< RSSI for received packet. */
    uint8_t noack;                                  /**< Flag indicating that this packet will not be 
                                                          acknowledged. */
    uint8_t pid;                                    /**< PID assigned during communication. */
    uint8_t data[NRF_ESB_MAX_PAYLOAD_LENGTH];  /**< The payload data. */
} nrf_esb_payload_t;

Does the macro fill all the fields of this structure, if so, what will be the values of each field in this example?

Thanks,

Related