MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
MPU API Specification

Overview

This section describes functions and macros of the driver's API.

Macros

#define MPU_RgdInit(rgd, cfg)
 Initializes region descriptor. More...
 
#define MPU_RgdUpdate(rgd, master, spvr, user, pid_ctrl)
 Updates region descriptor. More...
 
#define MPU_Enable()
 Enables MPU on global level. More...
 
#define MPU_Disable()
 Disables MPU on global level. More...
 
#define MPU_DisableRGD0()
 Disables overlapping RGD0 descriptor. More...
 

Macro Definition Documentation

#define MPU_RgdInit (   rgd,
  cfg 
)

This macro initializes region descriptor by configurations for supported bus masters; i.e. "CM0" and "DMA".

Parameters
rgdRGD1,RGD2,RGD3,RGD4,RGD5,RGD6,RGD7.
cfgSelect one of the MPU Configuration Structures.
Note
Implemented as an inline macro.
Warning
The RGD0 descriptor has a special usage. It is intended for debug. Core cannot write to WORD0,1,3, registers otherwise hard fault occurs. In order to invalidate RGD0 for controlling access of "CM0" and "DMA" masters (not "DEBUG" master) call MPU_DisableRGD0.
See also
MPU_RgdUpdate
#define MPU_RgdUpdate (   rgd,
  master,
  spvr,
  user,
  pid_ctrl 
)

This macro updates region descriptor by configurations for supported bus masters; i.e. "CM0" and "DMA".

Parameters
rgdRGD0,RGD1,RGD2,RGD3,RGD4,RGD5,RGD6,RGD7.
masterCM0,DMA.
spvrSelect one of the MPU Supervisor Mode Access Attributes.
userSelect one of the MPU User Mode Access Attributes.
pid_ctrlTRUE Process identifier and mask are included in the region hit evaluation
FALSE Process identifier and mask are not included in the region hit evaluation.
Note
Implemented as an inline macro.
See also
MPU_RgdInit
#define MPU_Enable ( )

This macro enables MPU on global level by asserting MPU_CESR[VLD] bit.

Note
Implemented as an inline macro.
See also
MPU_Disable
#define MPU_Disable ( )

This macro disables MPU on global level by clearing MPU_CESR[VLD] bit.

Note
Implemented as an inline macro.
See also
MPU_Enable
#define MPU_DisableRGD0 ( )

This macro disables RGD0 descriptor. The RGD0 descriptor will no longer overlaps with other descriptors set for "CM0" and "DMA" masters.

Note
Implemented as an inline macro. The RGD0 descriptor is be still enabled and overlapping with other regions to allow access "DEBUG" master.