EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
em_mpu.h File Reference

Detailed Description

Memory protection unit (MPU) peripheral API.

Version
5.1.2

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file em_mpu.h.

#include "em_device.h"
#include "em_assert.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  MPU_RegionInit_TypeDef
 

Macros

#define MPU_CTRL_HFNMIENA   MPU_CTRL_HFNMIENA_Msk
 
#define MPU_CTRL_PRIVDEFENA   MPU_CTRL_PRIVDEFENA_Msk
 
#define MPU_INIT_FLASH_DEFAULT
 
#define MPU_INIT_PERIPHERAL_DEFAULT
 
#define MPU_INIT_SRAM_DEFAULT
 

Enumerations

enum  MPU_RegionAp_TypeDef {
  mpuRegionNoAccess = 0,
  mpuRegionApPRw = 1,
  mpuRegionApPRwURo = 2,
  mpuRegionApFullAccess = 3,
  mpuRegionApPRo = 5,
  mpuRegionApPRo_URo = 6
}
 
enum  MPU_RegionSize_TypeDef {
  mpuRegionSize32b = 4,
  mpuRegionSize64b = 5,
  mpuRegionSize128b = 6,
  mpuRegionSize256b = 7,
  mpuRegionSize512b = 8,
  mpuRegionSize1Kb = 9,
  mpuRegionSize2Kb = 10,
  mpuRegionSize4Kb = 11,
  mpuRegionSize8Kb = 12,
  mpuRegionSize16Kb = 13,
  mpuRegionSize32Kb = 14,
  mpuRegionSize64Kb = 15,
  mpuRegionSize128Kb = 16,
  mpuRegionSize256Kb = 17,
  mpuRegionSize512Kb = 18,
  mpuRegionSize1Mb = 19,
  mpuRegionSize2Mb = 20,
  mpuRegionSize4Mb = 21,
  mpuRegionSize8Mb = 22,
  mpuRegionSize16Mb = 23,
  mpuRegionSize32Mb = 24,
  mpuRegionSize64Mb = 25,
  mpuRegionSize128Mb = 26,
  mpuRegionSize256Mb = 27,
  mpuRegionSize512Mb = 28,
  mpuRegionSize1Gb = 29,
  mpuRegionSize2Gb = 30,
  mpuRegionSize4Gb = 31
}
 

Functions

void MPU_ConfigureRegion (const MPU_RegionInit_TypeDef *init)
 Configure an MPU region. More...
 
__STATIC_INLINE void MPU_Disable (void)
 Disable the MPU. More...
 
__STATIC_INLINE void MPU_Enable (uint32_t flags)
 Enable the MPU. More...