RZA FreeRTOS

From Renesas.info
Revision as of 17:30, 10 December 2021 by Zkmike (talk | contribs) (Created page with "====== Using the floating point unit (FPU) in interrupts ====== '''Issue''' : By default, the Cortex-A9 port does not support the use of the floating point unit in interrupts...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Using the floating point unit (FPU) in interrupts

Issue :

By default, the Cortex-A9 port does not support the use of the floating point unit in interrupts. If it is necessary to use the floating point unit in interrupts then it will also be necessary to save the entire floating point context to the stack on entry to each (potentially nested) interrupt. From FreeRTOS V9.0.0 the FreeRTOS GCC Cortex-A port can do this automatically for you. By default the RZA FreeRTOS does not enable this for the RZA. Does the RZA support floating point unit (FPU) in interrupts?

Solution:

The reason why configUSE_TASK_FPU_SUPPORT is set to 1, is to save stack memory.

You can set configUSE_TASK_FPU_SUPPORT to 2.

I recommend keeping configUSE_TASK_FPU_SUPPORT 1, and call portTASK_USES_FLOATING_POINT() function at the beginning of a task that uses the floating-point calculation.

The example of calling portTASK_USES_FLOATING_POINT() is shown in following URL:

https://www.freertos.org/Using-FreeRTOS-on-Cortex-A-Embedded-Processors.html

And if there is interrupt handler that uses FPU, the following operation is required at the top and the end of IRQ handler.