2018-04-10 01:27 AM
Hi,
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.
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.
void ProcessMainTask(void *arg) //Non Privilege Task
{g_NonPrivMemArray[0]
= 1;while(1){vTaskDelay(10);}}It assigns g_NonPrivMemArray
[0]
with 1, then tries to delay and crashes.Any pointers on what could cause this?
Regards