This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVM430-FR6047: Payload structure of messages

Part Number: EVM430-FR6047


Hi TI-Team,

I have a question regarding the payload structure of the messages for the two commands:
- Command 0x97 (Request Delta ToF, Abs ToF and Volume Flow data)
- Command 0x98 (Request UPS and DNS captures)

I can receive the payload after sending the reqeuest very well.
But I did not yet understand the structure of the message payload completely.
How can I read/convert the actual value (float/int) from the payload?

Two examples:
A) Command 0x97 (Request Delta ToF, Abs ToF and Volume Flow data)
1.
SEND command 0x97 to EVM:

2.
RECEIVE msg 0xB3 from EVM:

???-> how to convert payload now to measuring value???
Documentation says float data type Byte[3](LSB), Byte[6](MSB).

So is the float data:
3e-ec-c4-00 = 0.462432861 (float little endian DCBA) ?
----------------------------------------------------------------------------------------------------
B) Command 0x98 (Request UPS and DNS captures)
SEND 'request command' to EVM:

RECEIVE 'start command' from EVM:

RECEIVE 'payload packages from EVM:

Documentation says int16_t (-32768,32767). So I guess two bytes = one int16_t. But which bytes to read first, and which one is MSB/LSB?
Do I start with package one, payload 0/payload1 and end with package 6 payload 55/56?

So in this case:
first adc capture value: 08-00 = 2048 (signed int big endian AB)
last adc capture value: 01-00 = 256 (signed int big endian AB) ?

Thank you for your help
Best regards
Lucio

  • Hi Lucio,

    Let me see if I can get answers for you.

  • Hi Lucio,

    Regarding the payload data and commands, refer to this posting.

    Regarding the data formats I am being told:

    MSP430 is a little-endian device. You can see that in the compiler settings:

    1. So you are correct with the float:

    ----------------------------------------------------------------------------------------------------

    So is the float data:
    3e-ec-c4-00 = 0.462432861 (float little endian DCBA) ?

    ----------------------------------------------------------------------------------------------------

    Additional information at https://en.wikipedia.org/wiki/Endianness

    & for our reference, you can see https://www.binaryconvert.com/result_float.html?decimal=048046052054050052051050056054049

     

    1. With the 2nd one, I think it should be reversed.

    ----------------------------------------------------------------------------------------------------

    Do I start with package one, payload 0/payload1 and end with package 6 payload 55/56?

                    ----------------------------------------------------------------------------------------------------

    YES

    ----------------------------------------------------------------------------------------------------

    So in this case:
    first adc capture value: 08-00 = 2048 (signed int big endian AB)
    last adc capture value: 01-00 = 256 (signed int big endian AB) ?

    ----------------------------------------------------------------------------------------------------

    Here it should be reversed. It is still little-endian. So

    08-00 is int16_t 0x0008 = 8

    01-00 is int16_t 0x0001 = 1

  • Hi Dennis,

    thanks a lot for your reply! Now it is clear and I get valid values.

    Best regards

    Lucio

**Attention** This is a public forum