arch/arm/core/cortex_m/mpu/arm_mpu.c
/*
 * @brief MPU default configuration
 *
 * This function provides the default configuration mechanism for the Memory
 * Protection Unit (MPU).
 */
@brief MPU default configuration
This function provides the default configuration mechanism for the Memory
Protection Unit (MPU).
@brief MPU default configuration This function provides the default configuration mechanism for the Memory Protection Unit ( MPU ) .
static void _arm_mpu_config(void)
{
	u32_t r_index;
	if (mpu_config.num_regions > _get_num_regions()) {
		return;
	}
	ARM_MPU_DEV->ctrl = 0;
	for (r_index = 0; r_index < mpu_config.num_regions; r_index++) {
		_region_init(r_index,
			     mpu_config.mpu_regions[r_index].base,
			     mpu_config.mpu_regions[r_index].attr);
	}
	ARM_MPU_DEV->ctrl = 1;
	__DSB();
	__ISB();
}
static void _arm_mpu_config ( void ) { u32_t r_index ; if ( mpu_config . num_regions > _get_num_regions ( ) ) { return ; } ARM_MPU_DEV -> ctrl = 0 ; for ( r_index = 0 ; r_index < mpu_config . num_regions ; r_index ++ ) { _region_init ( r_index , mpu_config . mpu_regions [ r_index ] . base , mpu_config . mpu_regions [ r_index ] . attr ) ; } ARM_MPU_DEV -> ctrl = 1 ; __DSB ( ) ; __ISB ( ) ; }
@brief MPU default configuration
 This function provides the default configuration mechanism for the Memory
 Protection Unit (MPU).
@brief MPU default configuration This function provides the default configuration mechanism for the Memory Protection Unit ( MPU ) .
/* ARM MPU supports up to 16 Regions */ /* Disable MPU */ /* Configure regions */ /* Enable MPU */ /* Make sure that all the registers are set before proceeding */