Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MPU - Memory Protect Unit

Modules

 MMU Initialization
 

Files

file  mpu.c
 SAMV70/SAMV71/SAME70/SAMS70-XULTRA board mpu config.
 

Functions

uint32_t mpu_cal_mpu_region_size (uint32_t dw_actual_size_in_bytes)
 Calculate region size for the RASR. More...
 
void mpu_disable_region (void)
 Disable the current active region. More...
 
void mpu_enable (uint32_t dw_mpu_enable)
 Enables the MPU module. More...
 
void mpu_set_region (uint32_t dw_region_base_addr, uint32_t dw_region_attr)
 Setup a memory region. More...
 
void mpu_set_region_num (uint32_t dw_region_num)
 Set active memory region. More...
 
void mpu_update_regions (uint32_t dw_region_num, uint32_t dw_region_base_addr, uint32_t dw_region_attr)
 Update MPU regions. More...
 

uint32_t mpu_cal_mpu_region_size ( uint32_t  dw_actual_size_in_bytes)

Calculate region size for the RASR.

void mpu_disable_region ( void  )

Disable the current active region.

Referenced by mpu_update_regions().

void mpu_enable ( uint32_t  dw_mpu_enable)

Enables the MPU module.

Parameters
dwMPUEnableEnable/Disable the memory region.
void mpu_set_region ( uint32_t  dw_region_base_addr,
uint32_t  dw_region_attr 
)

Setup a memory region.

Parameters
dwRegionBaseAddrMemory region base address.
dwRegionAttrMemory region attributes.

Referenced by mpu_update_regions().

void mpu_set_region_num ( uint32_t  dw_region_num)

Set active memory region.

Parameters
dwRegionNumThe memory region to be active.

Referenced by mpu_update_regions().

void mpu_update_regions ( uint32_t  dw_region_num,
uint32_t  dw_region_base_addr,
uint32_t  dw_region_attr 
)

Update MPU regions.

Returns
Unused (ANSI-C compatibility).

References cpu_irq_restore(), cpu_irq_save(), mpu_disable_region(), mpu_set_region(), and mpu_set_region_num().