We have been trying to use ARM_CM4F_MPU port in one of our application. Freertos version is 10.0.0.
An unprivileged task always Mem Faults when trying to use a kernel API though mpu_wrappers is elevating the privilege of during kernel execution.
When Task calls vTaskDelay(), it crashes inside portYIELD_WITHIN_API() though I can see it gets executed when CPU state is in Privilege mode. nPRIV in CONTROL Register is 0 when this yield is called.
Was this a project you put together yourself, or a project we provided?
If a project you put together yourself then did you update the linker
script (or constants, depending on the compiler you are using) so the
memory bounds of the privileged data sections are defined correctly?
On entry to this task, we are accessing a couple of variables in SRAM whose region is defined as NON PRIVILEGE READ_WRITE. We are able to read write on this region. After this we are using vTaskDelay() inside which it Mem Faults when it calls portYIELD_WITHIN_API().
Even if the variables are disabed and only vTaskDelay() is called on entry inside this task, it faults.
Yes it contains an MPU version also. But it has version 9.0.0 of Freertos. We initially ported 10.0.0 into our application and all our tests have been on this version.
So we are hesitant to go back to 9.0.0 as we will have to redo all our tests.