SPNA237A April   2018  – October 2026 RM41L232 , RM42L432 , RM44L520 , RM44L920 , RM46L430 , RM46L440 , RM46L450 , RM46L830 , RM46L840 , RM46L850 , RM46L852 , RM48L530 , RM48L540 , RM48L730 , RM48L740 , RM48L940 , RM48L950 , RM48L952 , RM57L843 , TMS570LC4357 , TMS570LC4357-EP , TMS570LC4357-SEP , TMS570LS0232 , TMS570LS0332 , TMS570LS0432 , TMS570LS0714 , TMS570LS0714-S , TMS570LS0914 , TMS570LS1114 , TMS570LS1115 , TMS570LS1224 , TMS570LS1225 , TMS570LS1227 , TMS570LS2124 , TMS570LS2125 , TMS570LS2134 , TMS570LS2135 , TMS570LS3134 , TMS570LS3135 , TMS570LS3137

 

  1.   1
  2.   FreeRTOS on Hercules Devices
  3.   Trademarks
  4. 1FreeRTOS Source Files
  5. 2FreeRTOS Support in HALCoGen
  6. 3MPU Settings as an Add-on for Safety Use Cases
    1. 3.1 MPU Wrapper Functions
    2. 3.2 MPU Regions for Tasks
  7. 4Porting FREERTOS on a Different Part Number
  8. 5Revision History

MPU Wrapper Functions

There are two modes of CPU: privileged mode and user mode (names may differ depending on the device). User mode is a restricted mode, and is typically used to execute the user tasks. Privileged mode is used to execute the kernel code and for system initialization. The kernel code and data are typically placed in a privileged memory section, so that these are not accessed directly by user tasks. MPU wrapper functions provide wrappers for kernel functions so that they are executed in privileged mode.

Sample MPU wrapper function:

void MPU_vTaskDelete ( TaskHandle_t xTaskToDelete ) 
{ 
     BaseType_t xRunningPrivileged = prvRaisePrivilege(); 
     vTaskDelete ( xTaskToDelete ); 
     portRESET_PRIVILEGE( xRunningPrivileged ); 
}