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.

TM4C TI-RTOS Floating Point Issue

I have having an issue with floating point calculations. The numbers don't always calculate correctly. I did a lot of debugging and came to the conclusion that it seems the RTOS is not saving the floating point context correctly.

The error in the calculation is showing itself in a task but I am also doing some calculations in a timer HWI handler. If I disable the timer handler, the problems with the calculations in the task go away. This further points to an RTOS issue.

I searched on these forums and came across these two posts: here and here

It turns out there is an issue with floating point with an earlier version of SYS/BIOS.

I am using TI RTOS for Tiva C 2.14.0.10. Initially I downloaded TI RTOS outside of CCSv6.1.0. I also seem to have SYS/BIOS 6_42_01_20 installed  as well having a directory call bios_6_34_02_18. The latter seems to have the problem.

For my project properties, under RTSC, I disabled SYS/BIOS 6_34_02_18 and rebuilt my project but it still has the same issue.

Is there an issue with TI RTOS for Tiva C 2.14.0.10? If so, where can I check for this issue? How do I know exactly which versions of these tools are being linked in?

I am also using arm compiler v 5.2.5

Thanks

  • After reading through the posts I linked to again, I saw a note that I had originally missed:

    "[I found that on a Cortex M4, if a HWI interrupt is defined with a priority of less than disablePriority then the interrupt is a "Zero Latency" interrupt handler which is severely restricted in which SYS/BIOS functions can be called from the handler]"

    I set the priority of the HWI handler to -1 and now everything seems to be working. I lost a day on that one issue lol

    What about Timer handlers? I don't see a priority associated with them. Do they save the FPU state?

    Thanks
  • Hi Maxpower,

    Good to know you were able to figure out the FPU issue and resolve it.

    MaxPower said:


    What about Timer handlers? I don't see a priority associated with them. Do they save the FPU state?

    You can set the Hwi params (includes interrupt priority) for the Hwi internally created by the timer module to service the timer interrupt by initializing the HwiParams field inside TimerParams structure.

    Best,

    Ashish