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: FPU calculation is wrong

Part Number: TMS320F28335

Hi Expert,

My customer are using F28335 for AC/DC system, they face an issue that FPU calculation is wrong sometimes at their end customer system, they use PC via Uart to get the data from F28335, some FPU data is wrong while fix-point data is  correct, and there is no issue for Uart communication and CPU should still working, after repower the device, then there is no issue for the FPU. customer could not JTAG to connect to CCS at their end customer environment and did not reproduce the issue at their lab.

They guess there may be something wrong with FPU at some noise environment while CPU still working well, is it possible that FPU fail to work correctly while CPU still working well at some noise environment ?

any suggestion for this to help fix this issue?

  • Hi,

    It is possible that it could be a hardware fault. Before that, please answer the following:

    What FPU operations are you running? What libraries are failing?

    What configurations of the libraries (processor options, exact library used)

    What is the deviation from expected values?

    Is the fixed point library being used with FPU32 option enabled?

    -Shantanu

  • The divide/mutiply/add/sqrt operations are used in the project.All the float point data are just wrong showed as 0 or 32767 which  is obviously wrong .It is not clear what libraries are failing.Only the final result is read via sci.TM320F28335 is used and the flollowing three libaries are used in the project.They are rts2800.lib,rts2800_fpu32_fast_supplement.lib,Flash28335_API_V210.lib.

  • Hi Shantanu,

        If it is a hard fault,how to fix it?thank you for your immediate reply again!

  • Hi Allen,

    Is it possible for the customer to run a few of the FPU FAST RTS examples using the same setup and the same environment? They can read a global variable for pass/fail to make debug easier. That way we can rule out a hardware fault and look at the project itself. 

    Can you also share the project files? (.cproject, .project, .ccsproject). 

    -Shantanu

  • Hi Shanty,

    It's gald to hear from you.Your reply are really helpful.I am sorry we can't share the whole project.We are pretty sure it is not a software bug.Because we checked the stack and  all the software is written in C language.In order to detect the FPU failure and rescue the cpu,

    one float point multiplication and divison are written and the watchdog will overflow and  cpu will reset if the result is wrong.I just wonder whether it works or not. Your reply about whether the FPU will crash under noisy enviroment and how to detect the situation and act. will be great help.

    Thanks again!

  • HI,

    The device has been qualified and tested under many conditions. It is quite unlikely that the FPU module itself has failed. 

    One thing you can check is if for some reason the data is getting overwritten right after being received by the device in the noisy environment.

    -Shantanu

  • Hi Shantanu,

    After analysing the data stored in the PC,it shows that not only the float data via  sci are wrong ,the float  data for control are also wrong because the machine tripped due to over current. According to the available information from the site ,float point data stored in different address are wrong and cpu is still running.we guess the FPU crashed and cpu was working.

    We have checked  software and found no such bug.The same software have run in other places and just work fine. 

  • Hi Shantanu,

    We have also handled F2812 crash becasue of noise on some other apllications .Noise may disturb F2818 through JTAG or other route.This is the first time we use TMS28335 and float point data.It somehow confused me becuase FPU may crash while CPU was working.

  • Hi,

    Are you using the compiler FPU intrinsics or the Fast RTS library routines for the arithmetic? As you mention that all the floating point data are just wrong showed as 0 or 32767, I wonder if something in your sequence is leading to memory reset?

    I understand that it may not be possible to share the complete code but you can try to reproduce the portion of code that seems to be faulty and share with us for analysis otherwise it's very difficult to figure out the root cause without complete details.

    Regards

    Himanshu