MPU_vTaskAllocateMPURegions() is only used within FreeRTOS.
 
Symbols
loading...
Files
loading...

MPU_vTaskAllocateMPURegions() function

Memory regions are assigned to a restricted task when the task is created by a call to xTaskCreateRestricted(). These regions can be redefined using vTaskAllocateMPURegions(). Example usage:
// Define an array of MemoryRegion_t structures that configures an MPU region // allowing read/write access for 1024 bytes starting at the beginning of the // ucOneKByte array. The other two of the maximum 3 definable regions are // unused so set to zero. static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] = { // Base address Length Parameters { ucOneKByte, 1024, portMPU_REGION_READ_WRITE }, { 0, 0, 0 }, { 0, 0, 0 } }; void vATask( void *pvParameters ) { // This task was created such that it has access to certain regions of // memory as defined by the MPU configuration. At some point it is // desired that these MPU regions are replaced with that defined in the // xAltRegions const struct above. Use a call to vTaskAllocateMPURegions() // for this purpose. NULL is used as the task handle to indicate that this // function should modify the MPU regions of the calling task. vTaskAllocateMPURegions( NULL, xAltRegions ); // Now the task can continue its function, but from this point on can only // access its stack and the ucOneKByte array (unless any other statically // defined or shared regions have been declared elsewhere). }

Syntax

void vTaskAllocateMPURegions( TaskHandle_t xTask,     const MemoryRegion_t * const pxRegions );
Implemented in mpu_wrappers.c:141

Arguments

xTask

The handle of the task being updated.

pxRegions

References

LocationText
mpu_wrappers.c:141
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions ) /* FREERTOS_SYSTEM_CALL */
mpu_prototypes.h:45
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ) FREERTOS_SYSTEM_CALL;
task.h:665

Call Tree

Functions called by MPU_vTaskAllocateMPURegions()
MPU_vTaskAllocateMPURegions()
Data read by MPU_vTaskAllocateMPURegions()
MPU_vTaskAllocateMPURegions()::xRegions
MPU_vTaskAllocateMPURegions()::xRunningPrivileged
all items filtered out
MPU_vTaskAllocateMPURegions()
Type of MPU_vTaskAllocateMPURegions()
MPU_vTaskAllocateMPURegions()
all items filtered out