Other Parts Discussed in Thread: IWR1642BOOST
Hi,
I was writing a generic uart code on a master microcontroller to receive data via UART of IWR1642Boost. I would like to know about, is packet length always fixed to 288 bytes if not then which part in UART packet changes its length and when it changes? I think UART packet length might change if I change .cfg?
I understood that header contains the information of total packet length and header size is fixed to 40 bytes. So there is always a possibility to read the header in 40 bytes array and so as TLV header and VitalStats data as given in below image.
But I am not sure, what would be the size of Range Profile? Currently, it is 76 bytes in demo example. Is it always fixed to 76 or it varies with .cfg file and if yes then how?
As of now, I can read header 40 bytes, then TLV header of 8 bytes followed by 128 bytes Vital stats and 8 bytes TLV header but not sure about the size of Range Profile.
Moreover, the header says total packet length is 288 bytes and if I subtract sizeof(Header, TLV and VitalStats), I get 104.
104 = 288 - 40 - 8 - 128 - 8
(remaining data to be send = total packet - sizeof(header + tlv + vitalstats + tlv))
Now, I get 104 with two variable Size of Range Profile and Padding, which becomes
104 = sizeof(Range Profile + Padding)
To solve this puzzle, I have to know the size of any one variable in advance. In the current demo, it is fixed to 76 bytes and 28 bytes.
Long story in short, Is these sizes are always fixed (in which case I do not need to worry about the variable packet length read via uart)?