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

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

Arguments

xTask

The handle of the task being updated.

pxRegions

References

LocationReferrerText
tasks.c:3593
void vTaskAllocateMPURegions( TaskHandle_t xTaskToModify, const MemoryRegion_t * const xRegions )
task.h:665
void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ) PRIVILEGED_FUNCTION;
mpu_wrappers.c:145MPU_vTaskAllocateMPURegions()
vTaskAllocateMPURegions( xTask, xRegions );

Call Tree

Functions calling vTaskAllocateMPURegions()
Functions called by vTaskAllocateMPURegions()
all items filtered out
vTaskAllocateMPURegions()
all items filtered out
Data read by vTaskAllocateMPURegions()
Data written by vTaskAllocateMPURegions()
vTaskAllocateMPURegions()::xTaskToModify
vTaskAllocateMPURegions()::xRegions
vTaskAllocateMPURegions()::pxTCB
all items filtered out
vTaskAllocateMPURegions()
vTaskAllocateMPURegions()::pxTCB
all items filtered out
Type of vTaskAllocateMPURegions()
vTaskAllocateMPURegions()
all items filtered out