|
SmartSnippets DA1459x SDK
|
Go to the documentation of this file.
51 #if dg_configUSE_HW_MPU
56 #define MPU_START_ADDRESS_MASK (~MPU_END_ADDRESS_MASK)
60 #define MPU_END_ADDRESS_MASK (0x1F)
218 REG_SETF(MPU, CTRL, HFNMIENA, hfnmiena);
240 REG_SETF(MPU, CTRL, PRIVDEFENA, privdefena);
262 uint32_t MPU_Control = (privdefena ?
REG_MSK(MPU, CTRL, PRIVDEFENA) : 0);
263 ARM_MPU_Enable(MPU_Control);
283 return (!!
REG_GETF(MPU, CTRL, ENABLE));
HW_MPU_ATTR attributes
Definition: hw_mpu.h:203
#define REG_SETF(base, reg, field, new_val)
Set the value of a register field.
Definition: sdk_defs.h:738
HW_MPU_XN
Executable Region.
Definition: hw_mpu.h:92
HW_MPU_XN execute_never
Definition: hw_mpu.h:202
HW_MPU_AP access_permissions
Definition: hw_mpu.h:200
HW_MPU_APL_NP
Privileged or Non-Privileged access.
Definition: hw_mpu.h:115
__STATIC_FORCEINLINE bool hw_mpu_is_enabled(void)
Checks if MPU is enabled.
Definition: hw_mpu.h:281
__STATIC_FORCEINLINE void __ISB(void)
Instruction Synchronization Barrier.
Definition: cmsis_gcc.h:874
__STATIC_FORCEINLINE void hw_mpu_disable(void)
Disables the MPU.
Definition: hw_mpu.h:270
uint32_t end_addr
Definition: hw_mpu.h:199
HW_MPU_SH
Shareability.
Definition: hw_mpu.h:173
HW_MPU_ATTR_INDEX
Memory attributes.
Definition: hw_mpu.h:141
Central include header file with platform definitions.
Memory Region Configuration.
Definition: hw_mpu.h:197
void hw_mpu_reset_attribute_indirections()
Resets all MPU attribute indirections. MPU Attribute Index pattern is returned to one-to-one configur...
void hw_mpu_config_region(HW_MPU_REGION_NUM region_num, mpu_region_config *cfg)
Configures an MPU region. Region's start and end addresses will be aligned to 32 byte boundary....
HW_MPU_SH shareability
Definition: hw_mpu.h:201
__STATIC_FORCEINLINE void hw_mpu_hardfault_nmi_handlers_enable(bool hfnmiena)
Enables/Disables the operation of MPU during hard fault, NMI, and FAULTMASK handlers.
Definition: hw_mpu.h:216
HW_MPU_APH_RO
Region Read/Write or Read Only.
Definition: hw_mpu.h:103
#define REG_MSK(base, reg, field)
Access register field mask.
Definition: sdk_defs.h:583
__STATIC_FORCEINLINE void hw_mpu_privileged_background_access_enable(bool privdefena)
Enables/Disables Privileged Background Access.
Definition: hw_mpu.h:238
uint32_t start_addr
Definition: hw_mpu.h:198
HW_MPU_ATTR
Memory Type.
Definition: hw_mpu.h:189
void hw_mpu_fetch_region_configuration(HW_MPU_REGION_NUM region_num, mpu_region_config *cfg)
Fetches the configuration of an MPU region.
#define REG_GETF(base, reg, field)
Return the value of a register field.
Definition: sdk_defs.h:711
HW_MPU_AP
Access Permissions.
Definition: hw_mpu.h:131
__STATIC_FORCEINLINE void hw_mpu_enable(bool privdefena)
Initializes the MPU by disabling its operation during faults, defining the background region privileg...
Definition: hw_mpu.h:260
HW_MPU_REGION_NUM
Region Definitions.
Definition: hw_mpu.h:73
void hw_mpu_set_attribute_indirection(HW_MPU_REGION_NUM region_num, HW_MPU_ATTR_INDEX attr)
Configures an MPU attribute indirection.