SDL API Guide for J7200
R5 MPU Functions

Introduction

Functions

void SDL_R5MPU_Enable (uint32_t enable)
 Enable/disable the Memory Protection Unit (MPU) More...
 
uint32_t SDL_R5MPU_getNumRegions (void)
 Get the number of unified MPU regions supported. More...
 
void SDL_R5MPU_Cfg (uint32_t regionNum, uint32_t baseAddrRegVal, uint32_t sizeRegVal, uint32_t accessCtrlRegVal)
 Configure an MPU region. More...
 
int32_t SDL_R5MPU_VerifyCfg (uint32_t regionNum, uint32_t baseAddrRegVal, uint32_t sizeRegVal, uint32_t accessCtrlRegVal)
 Verify an MPU region that is previously configured. More...
 
void SDL_R5FMPU_enableRegion (uint32_t regionNum, uint32_t enable)
 Enable/disable an MPU region. More...
 
int32_t SDL_R5MPU_VerifyEnableRegion (uint32_t regionNum, uint32_t enable)
 Verifies the previously called Enable/disable an MPU region API. More...
 
void SDL_R5MPU_readStaticRegisters (SDL_MPU_staticRegs *pStaticRegs, uint32_t regionNum)
 MPU API to Read the Static Registers. This function reads the values of the static registers such as System Control Register, MPU Type Register and MPU Region Number Register. More...
 

Function Documentation

◆ SDL_R5MPU_Enable()

void SDL_R5MPU_Enable ( uint32_t  enable)

Enable/disable the Memory Protection Unit (MPU)

This function is used to enable or disable the MPU.

Parameters
enable[IN] 0=MPU is disabled, otherwise MPU is enabled
Returns
None

◆ SDL_R5MPU_getNumRegions()

uint32_t SDL_R5MPU_getNumRegions ( void  )

Get the number of unified MPU regions supported.

This function is used to get the number of unified MPU regions supported.

Returns
The number of unified MPU regions supported

◆ SDL_R5MPU_Cfg()

void SDL_R5MPU_Cfg ( uint32_t  regionNum,
uint32_t  baseAddrRegVal,
uint32_t  sizeRegVal,
uint32_t  accessCtrlRegVal 
)

Configure an MPU region.

This function is used to configure an MPU region.

The value arguments provided to this function are directly written into the corresponding R5 system register. As a result, the values must be constructed per the expected register format.

See the "MPU memory region programming registers" section of the ARM Cortex R5 TRM for more information.

Parameters
regionNum[IN] Region number
baseAddrRegVal[IN] Value written to the MPU Region Base Address Register
sizeRegVal[IN] Value written to the MPU Size and Enable Register
accessCtrlRegVal[IN] Value written to the MPU Region Access Control Register
Returns
None

◆ SDL_R5MPU_VerifyCfg()

int32_t SDL_R5MPU_VerifyCfg ( uint32_t  regionNum,
uint32_t  baseAddrRegVal,
uint32_t  sizeRegVal,
uint32_t  accessCtrlRegVal 
)

Verify an MPU region that is previously configured.

This function is used to verify the previous configure an MPU region API.

The value arguments provided to this function are directly verfied against the corresponding R5 system register. As a result, the values must be constructed per the expected register format.

See the "MPU memory region programming registers" section of the ARM Cortex R5 TRM for more information.

Parameters
regionNum[IN] Region number
baseAddrRegVal[IN] Value written to the MPU Region Base Address Register
sizeRegVal[IN] Value written to the MPU Size and Enable Register
accessCtrlRegVal[IN] Value written to the MPU Region Access Control Register
Returns
None

◆ SDL_R5FMPU_enableRegion()

void SDL_R5FMPU_enableRegion ( uint32_t  regionNum,
uint32_t  enable 
)

Enable/disable an MPU region.

This function is used to enable or disable an MPU region.

Parameters
regionNum[IN] Region number
enable[IN] 0=The specified MPU region is disabled, otherwise it is enabled
Returns
None

◆ SDL_R5MPU_VerifyEnableRegion()

int32_t SDL_R5MPU_VerifyEnableRegion ( uint32_t  regionNum,
uint32_t  enable 
)

Verifies the previously called Enable/disable an MPU region API.

This function is used to verify enable or disable an MPU region.

Parameters
regionNum[IN] Region number
enable[IN] 0=The specified MPU region is disabled, otherwise it is enabled
Returns
SDL_PASS for success otherwise SDL_EFAIL

◆ SDL_R5MPU_readStaticRegisters()

void SDL_R5MPU_readStaticRegisters ( SDL_MPU_staticRegs pStaticRegs,
uint32_t  regionNum 
)

MPU API to Read the Static Registers. This function reads the values of the static registers such as System Control Register, MPU Type Register and MPU Region Number Register.

Parameters
pStaticRegs[IN] Pointer to the static registers structure
regionNum[IN] Region number
Returns
None