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.

CCS/TMS320F28377D: Problem with floating point numbers

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

I have a code compiled with v18.12.6.LTS compiler. Surprisingly, the variables defined as float occupy only two bytes of memory. It is causing me a lot of problems when I have to transmit these variables over serial interface (UART). The loss of two bytes means the number at the output is not meaningful at all.

Not sure if someone else ever came across this and how did they solve it. Will appreciate any help on this.

  • Hello,

    There is no "byte" in C2000 family. The memory is organized as 16-bit words, so 32-bit float occupies only two 16-bit memory locations.
    If you need to transfer it thru UART then you'll have to send LSB (8-bit) and MSB (8-bit) of each of two words.

    Hope this helps,
    Andy