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.

TMS320F28335: Significant Bug in TI's Add on for Simulink Embedded Coder

Part Number: TMS320F28335

The TI embedded coder driver for simulink has a significant bug.  I reported it to Mathworks but they say the problem is with TI.

In Simulink, If you click on the "Gear" icon and go to hardware implementation-> Device details, the TI drivers say that "doubles" on the TI processors are 64 bits when they are actually 32 bits.  It says this for all TI processors.  The problem is that certain operations require testing for a maximum machine precision number (for example the sign function and some complex math functions). Simulink thinks that the compiler supports 64 bit numbers (when it actually does not) so it codes this incorrectly with a constant of 4.4E308 which crashes the compiler.  If you force the code for that one operation to use single precision, you get the correct constant of 1.7E38.  This workaround gets past the problem but it has other issues and requires constant double to single conversions to make successful code from Simulink.  Is there a way to change the 64 bit double to 32 bit in the TI driver or do we need an update from TI?  Thank you.

Regards