Am I right to think that a context switch is required for vTaskAllocateMPURegions() to become effective? My tests seem to confirm that, also inspecting that function shows that indeed the settings are only stored in TCB, not “applied” in any way to the MPU.
If I’m right then is that a flaw in design or maybe that’s intended? There is no function to perform such “apply” other than yielding or sth like that (delay, API call, …).
BTW - I think that a feature that would allow “restoring” previous settings of regions would be nice - sometimes you need to change the regions and than change them back, but there is no way to “get” current settings so that these could be used later. One needs to use the same array as used for defining a task, and that sometimes is not desireable (scope of variables).
BTW2 - I’m having a really hard time trying to learn how to use MPU (; Having all tasks in privileged mode doesn’t seem like a good answer, neither does continuous reconfigurations of MPU regions…