I was reading the documentation, trying to figure out something specific while reading though source code. I was looking at the LENGTH field specified in the nrf52840 PS guide 6.20 RADIO — 2.4 GHz radio. Under packet configuration section I was looking at the packet layout in memory and it sort of made sense as I read it, but then I looked for anything specific about LENGTH other than it exists.
To quickly put my confusion away I searched up LENGTH Field Question and then I realized I didn't know what I thought I knew.
I had sailed past this section with an understanding of the picture but no real knowledge about it.
What I believe is correct now is there are the S0, LENGTH and S1 areas that can be configured in for output the packet.
- S0 and S1 are generic bit fields that can be inserted into the outgoing stream they can be length 0 and therefore not exist.
- LENGTH is also a generic bit field but is also variable in length and can be 0 and therefore not exist.
These ideas bring me to the following assertions:
1. All three fields can be zero length, they do not affect the transmit or receiver hardware in any way, OTHER than being automatically parsed out of the bitstream, is that correct?
2. If these fields are 0 length, they don't need to be inserted into the transmit buffer. The first bits transmitted will instantly be the payload. Is this correct?
3. The LENGTH field is named LENGTH to give and idea of where a length field could be put into the packet. Its name isn't relevant otherwise. The radio doesn't use this byte (field) for anything. Is this correct? ** this doesn't seem correct by what is said in the Linked question of the same name, and I keep getting hung up on how variable length packet output works.
If you could provide me with clarification, I would appreciate it.
Yes, I am aware of this being handled by the library, but I really want to understand the RADIO peripheral and I am a little unhappy that "LENGTH" isn't given a real good operational definition if it actually causes a change in the behavior of the radio.
Perhaps I just blew a circuit in my brain trying to read though the operation of esb.c code.