📄 hw_nvic.h
字号:
//
//*****************************************************************************
#define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region
#define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults
#define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_NUMBER
// register.
//
//*****************************************************************************
#define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access
#define NVIC_MPU_NUMBER_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_BASE register.
//
//*****************************************************************************
#define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask
#define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid
#define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number
#define NVIC_MPU_BASE_ADDR_S 5
#define NVIC_MPU_BASE_REGION_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_ATTR register.
//
//*****************************************************************************
#define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes
#define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable
#define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege
#define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access
#define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none
#define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only
#define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw
#define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none
#define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro
#define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask
#define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable
#define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable
#define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable
#define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits
#define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable
#define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable
#define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable
#define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable
#define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable
#define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable
#define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable
#define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable
#define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask
#define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes
#define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes
#define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes
#define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes
#define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes
#define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes
#define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes
#define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes
#define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes
#define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes
#define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes
#define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes
#define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes
#define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes
#define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes
#define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes
#define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes
#define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes
#define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes
#define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes
#define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes
#define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes
#define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes
#define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes
#define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes
#define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes
#define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes
#define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes
#define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_BASE1 register.
//
//*****************************************************************************
#define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask
#define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid
#define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number
#define NVIC_MPU_BASE1_ADDR_S 5
#define NVIC_MPU_BASE1_REGION_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_ATTR1 register.
//
//*****************************************************************************
#define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable
#define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege
#define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask
#define NVIC_MPU_ATTR1_SHAREABLE \
0x00040000 // Shareable
#define NVIC_MPU_ATTR1_CACHEABLE \
0x00020000 // Cacheable
#define NVIC_MPU_ATTR1_BUFFRABLE \
0x00010000 // Bufferable
#define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits
#define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask
#define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_BASE2 register.
//
//*****************************************************************************
#define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask
#define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid
#define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number
#define NVIC_MPU_BASE2_ADDR_S 5
#define NVIC_MPU_BASE2_REGION_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_ATTR2 register.
//
//*****************************************************************************
#define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable
#define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege
#define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask
#define NVIC_MPU_ATTR2_SHAREABLE \
0x00040000 // Shareable
#define NVIC_MPU_ATTR2_CACHEABLE \
0x00020000 // Cacheable
#define NVIC_MPU_ATTR2_BUFFRABLE \
0x00010000 // Bufferable
#define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits
#define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask
#define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_BASE3 register.
//
//*****************************************************************************
#define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask
#define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid
#define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number
#define NVIC_MPU_BASE3_ADDR_S 5
#define NVIC_MPU_BASE3_REGION_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_MPU_ATTR3 register.
//
//*****************************************************************************
#define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable
#define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege
#define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask
#define NVIC_MPU_ATTR3_SHAREABLE \
0x00040000 // Shareable
#define NVIC_MPU_ATTR3_CACHEABLE \
0x00020000 // Cacheable
#define NVIC_MPU_ATTR3_BUFFRABLE \
0x00010000 // Bufferable
#define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits
#define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask
#define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DBG_CTRL register.
//
//*****************************************************************************
#define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask
#define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key
#define NVIC_DBG_CTRL_S_RESET_ST \
0x02000000 // Core has reset since last read
#define NVIC_DBG_CTRL_S_RETIRE_ST \
0x01000000 // Core has executed insruction
// since last read
#define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up
#define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping
#define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt
#define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available
#define NVIC_DBG_CTRL_C_SNAPSTALL \
0x00000020 // Breaks a stalled load/store
#define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping
#define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core
#define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core
#define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DBG_XFER register.
//
//*****************************************************************************
#define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read
#define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register
#define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0
#define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1
#define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2
#define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3
#define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4
#define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5
#define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6
#define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7
#define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8
#define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9
#define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10
#define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11
#define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12
#define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13
#define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14
#define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15
#define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register
#define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP
#define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP
#define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP
#define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DBG_DATA register.
//
//*****************************************************************************
#define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache
#define NVIC_DBG_DATA_S 0
//*****************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -