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

nRF51 radio packet configuration

Hi there,

About radio packet config, would someone please help?

1. Meaning of the LENGTH filed in packet structure. Is it size of payload or of the whole packet? 

2. How can a receiver determine the packet/payload size if the LENGTH field was omitted? 

3. What is a "Static Length", e.g. as in PCNF1.STATLEN? How does it relate to packet/payload size?

 Thanks & regards,

  Vince

  • Hi,

    1. Meaning of the LENGTH filed in packet structure. Is it size of payload or of the whole packet?

    The length field represents the payload length.

    2. How can a receiver determine the packet/payload size if the LENGTH field was omitted? 

    This is all up to your protocol. For instance, it could be that you use a protocol with another way of determining length, or fixed-length packets.

    3. What is a "Static Length", e.g. as in PCNF1.STATLEN? How does it relate to packet/payload size?

     The static length field defines the length of the static payload. This is an additional payload that is transmitted immediately after the payload. It is normally not used, so you can probably just set the static length to 0 and forget about it.

  • Thank you, Einar!  You are right. I had successfully transmitted and received variable length messages, with static length set to zero. But I guess at least one of payload length and static length has to be set for the radio to figure out packet boundary then raise the PAYLOAD and END events, since CPU has no way to trigger them.

Related