I am using FreeRTOS (kernel V10.3.0) on a Zynq 7020 (PicoZed board).
I’ve recently discovered that a set of Floating Point Calculations occasionally fails. They are in a low priority task and I recently started a frequent interrupt (70 microsecond period) which enabled a high priority task. The FP Calculations in the low priority task fail every few minutes.
If I surround the calculations with taskENTER_CRITICAL()/taskEXIT_CRITICAL() the issues goes away.
I have tried setting use_task_fpu_support to 2. I have tried setting it to 1 and calling portTASK_USES_FLOATING_POINT(); at the start of every task. Neither one solves the problem. I have verified I am not doing any floating point in any ISR.
I am using FreeRTOS asymmetrically on both cores of the 7020. I see evidence that the issue happens on both cores. The only tasks common to both cores are Inter-processor Communications tasks which don’t do floating point (but still declare that they do, just in case).
The only explanation I can come up with is that FreeRTOS is not properly saving the FPU context on this processor.
Is this a known problem in this version of FreeRTOS? Has anyone seen this or have a work around (other than disabling task switching for any code path that might include Floating Point)?