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.

TMS320F28035: Double precision floating point support on TMS320F28035 platform

Part Number: TMS320F28035


Dear TI community, 

Up to now, we are successful in using single precision floating point number on the TMS320F28035 platform. No problem, no errors everything goes well.

Now we are looking for using double precision floating point number on the  TMS320F28035 platform. No compile errors with code compose studio, but but we got strange behaviour.  We got only zeros as results. Same behaviour when we try to send double precision floating point number over the CAN bus. We only get zeros.

My questions are: 

1. Does the  TMS320F28035 platform support double precision floating point numbers?

2. If yes, are there some settings to take into consideration or to activate, to be productive with the double precision floating point numbers? 

3. Any other recommendation with double precision floating point numbers with this  TMS320F28035 platform are also welcome.

Thanks a lot for your feedback

Best regards

P.Kocher

  • Philippe,

    Philippe%2520Kocher said:
    1. Does the  TMS320F28035 platform support double precision floating point numbers?

    The F2803x devices have a fixed-point CPU.  The floating point is emulated through software and both 32-bit and 64-bit floats are supported.  

    Philippe%2520Kocher said:
    2. If yes, are there some settings to take into consideration or to activate, to be productive with the double precision floating point numbers? 

    Yes - on the C28x when compiling for COFF (which is the supported output for the device you are using) a "double" is a 32-bit float.  In order to define a 64-bit value you will need to use the data type "long double".

    This is documented in the C2000 Compiler Guide . Refer to section 6.4 which describes the data-types. 

    (Note that the EABI output format is not supported by TI's collateral for the F28035 device.)

    Philippe%2520Kocher said:
    3. Any other recommendation with double precision floating point numbers with this  TMS320F28035 platform are also welcome.

    Something else may be going on with the project.  Using the "float" or "double" data type are equivalent since both define a 32-bit floating point value.   Resolving the issue may require more debug and any additional information you can provide will help.

    Is everything else identical in both cases? Which compiler version are you using?  The latest version is 18.12.0.LTS.  

    Regards

    Lori

  • Hi Philippe,

    Have you been able to move ahead with this issue? Let me know if it is resolved or if you have further debug information.

    Regards
    Lori
  • Dear E2E Community, Dear Lori,

    Yes Problem solved!

    Thanks a lot

    Best regards

    Philippe K.