I’m using the M4 MPU port for the M7. I noticed that when configTOTAL_MPU_REGIONS != 16, we program only 4 MPU regions. And when configTOTAL_MPU_REGIONS == 16, we program only 12 regions.
Hi @davidantaki
The FreeRTOS-Kernel uses 4 MPU regions to protect kernel resources. As a result, when the MCU has 8 MPU regions, 4 are available to application tasks and when MCU has 16 MPU regions, 12 are available to application tasks. These MPU regions are per task and therefore, we reprogram these regions on each context switch.