libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.

Defined Constants and Types for the Memory Systems Controller More...

Collaboration diagram for MSC Defines:

Macros

#define MSC_CTRL   MMIO32(MSC_BASE + 0x000)
 
#define MSC_READCTRL   MMIO32(MSC_BASE + 0x004)
 
#define MSC_WRITECTRL   MMIO32(MSC_BASE + 0x008)
 
#define MSC_WRITECMD   MMIO32(MSC_BASE + 0x00C)
 
#define MSC_ADDRB   MMIO32(MSC_BASE + 0x010)
 
#define MSC_WDATA   MMIO32(MSC_BASE + 0x018)
 
#define MSC_STATUS   MMIO32(MSC_BASE + 0x01C)
 
#define MSC_IF   MMIO32(MSC_BASE + 0x02C)
 
#define MSC_IFS   MMIO32(MSC_BASE + 0x030)
 
#define MSC_IFC   MMIO32(MSC_BASE + 0x034)
 
#define MSC_IEN   MMIO32(MSC_BASE + 0x038)
 
#define MSC_LOCK   MMIO32(MSC_BASE + 0x03C)
 
#define MSC_CMD   MMIO32(MSC_BASE + 0x040)
 
#define MSC_CACHEHITS   MMIO32(MSC_BASE + 0x044)
 
#define MSC_CACHEMISSES   MMIO32(MSC_BASE + 0x048)
 
#define MSC_TIMEBASE   MMIO32(MSC_BASE + 0x050)
 
#define MSC_MASSLOCK   MMIO32(MSC_BASE + 0x054)
 
#define MSC_CTRL_BUSFAULT   (1 << 0)
 
#define MSC_READCTRL_BUSSTRATEGY_SHIFT   (16)
 
#define MSC_READCTRL_BUSSTRATEGY_MASK    (0x3 << MSC_READCTRL_BUSSTRATEGY_SHIFT)
 
#define MSC_READCTRL_BUSSTRATEGY(v)
 
#define MSC_READCTRL_BUSSTRATEGY_CPU   MSC_READCTRL_BUSSTRATEGY(0)
 
#define MSC_READCTRL_BUSSTRATEGY_DMA   MSC_READCTRL_BUSSTRATEGY(1)
 
#define MSC_READCTRL_BUSSTRATEGY_DMAEM1   MSC_READCTRL_BUSSTRATEGY(2)
 
#define MSC_READCTRL_BUSSTRATEGY_NONE   MSC_READCTRL_BUSSTRATEGY(3)
 
#define MSC_READCTRL_RAMCEN   (1 << 7)
 
#define MSC_READCTRL_EBICDIS   (1 << 6)
 
#define MSC_READCTRL_ICCDIS   (1 << 5)
 
#define MSC_READCTRL_AIDIS   (1 << 4)
 
#define MSC_READCTRL_IFCDIS   (1 << 3)
 
#define MSC_READCTRL_MODE_SHIFT   (0)
 
#define MSC_READCTRL_MODE_MASK   (0x7 << MSC_READCTRL_MODE_SHIFT)
 
#define MSC_READCTRL_MODE(v)    (((v) << MSC_READCTRL_MODE_SHIFT) & MSC_READCTRL_MODE_MASK)
 
#define MSC_READCTRL_MODE_WS0   0
 
#define MSC_READCTRL_MODE_WS1   1
 
#define MSC_READCTRL_MODE_WS0SCBTP   2
 
#define MSC_READCTRL_MODE_WS1SCBTP   3
 
#define MSC_READCTRL_MODE_WS2   4
 
#define MSC_READCTRL_MODE_WS2SCBTP   5
 
#define MSC_WRITECTRL_IRQERASEABORT   (1 << 1)
 
#define MSC_WRITECTRL_WREN   (1 << 0)
 
#define MSC_WRITECMD_CLEARWDATA   (1 << 12)
 
#define MSC_WRITECMD_ERASEMAIN0   (1 << 8)
 
#define MSC_WRITECMD_ERASEABORT   (1 << 5)
 
#define MSC_WRITECMD_WRITETRIG   (1 << 4)
 
#define MSC_WRITECMD_WRITEONCE   (1 << 3)
 
#define MSC_WRITECMD_WRITEEND   (1 << 2)
 
#define MSC_WRITECMD_ERASEPAGE   (1 << 1)
 
#define MSC_WRITECMD_LADDRIM   (1 << 0)
 
#define MSC_STATUS_PCRUNNING   (1 << 6)
 
#define MSC_STATUS_ERASEABORTED   (1 << 5)
 
#define MSC_STATUS_WORDTIMEOUT   (1 << 4)
 
#define MSC_STATUS_WDATAREADY   (1 << 3)
 
#define MSC_STATUS_INVADDR   (1 << 2)
 
#define MSC_STATUS_LOCKED   (1 << 1)
 
#define MSC_STATUS_BUSY   (1 << 0)
 
#define MSC_IF_CMOF   (1 << 3)
 
#define MSC_IF_CHOF   (1 << 2)
 
#define MSC_IF_WRITE   (1 << 1)
 
#define MSC_IF_ERASE   (1 << 0)
 
#define MSC_IFS_CMOF   (1 << 3)
 
#define MSC_IFS_CHOF   (1 << 2)
 
#define MSC_IFS_WRITE   (1 << 1)
 
#define MSC_IFS_ERASE   (1 << 0)
 
#define MSC_IFC_CMOF   (1 << 3)
 
#define MSC_IFC_CHOF   (1 << 2)
 
#define MSC_IFC_WRITE   (1 << 1)
 
#define MSC_IFC_ERASE   (1 << 0)
 
#define MSC_IEN_CMOF   (1 << 3)
 
#define MSC_IEN_CHOF   (1 << 2)
 
#define MSC_IEN_WRITE   (1 << 1)
 
#define MSC_IEN_ERASE   (1 << 0)
 
#define MSC_LOCK_LOCKKEY_SHIFT   (0)
 
#define MSC_LOCK_LOCKKEY(v)   ((v) << MSC_LOCK_LOCKKEY_SHIFT)
 
#define MSC_LOCK_LOCKKEY_UNLOCKED   MSC_LOCK_LOCKKEY(0)
 
#define MSC_LOCK_LOCKKEY_LOCKED   MSC_LOCK_LOCKKEY(1)
 
#define MSC_LOCK_LOCKKEY_LOCK   MSC_LOCK_LOCKKEY(0)
 
#define MSC_LOCK_LOCKKEY_UNLOCK   MSC_LOCK_LOCKKEY(0x1B71)
 
#define MSC_CMD_STOPPC   (1 << 2)
 
#define MSC_CMD_STARTPC   (1 << 1)
 
#define MSC_CMD_INVCACHE   (1 << 0)
 
#define MSC_TIMEBASE_PERIOD   (1 << 16)
 
#define MSC_TIMEBASE_BASE_SHIFT   (0)
 
#define MSC_TIMEBASE_BASE_MASK   (0x3F << MSC_TIMEBASE_BASE_SHIFT)
 
#define MSC_TIMEBASE_BASE(v)    (((v) << MSC_TIMEBASE_BASE_SHIFT) & MSC_TIMEBASE_BASE_MASK)
 
#define MSC_MASSLOCK_LOCKKEY_SHIFT   (0)
 
#define MSC_MASSLOCK_LOCKKEY(v)   ((v) << MSC_MASSLOCK_LOCKKEY_SHIFT)
 
#define MSC_MASSLOCK_LOCKKEY_UNLOCKED   MSC_MASSLOCK_LOCKKEY(0)
 
#define MSC_MASSLOCK_LOCKKEY_LOCKED   MSC_MASSLOCK_LOCKKEY(1)
 
#define MSC_MASSLOCK_LOCKKEY_LOCK   MSC_MASSLOCK_LOCKKEY(0)
 
#define MSC_MASSLOCK_LOCKKEY_UNLOCK   MSC_MASSLOCK_LOCKKEY(0x631A)
 

Detailed Description

Defined Constants and Types for the Memory Systems Controller

LGPL License Terms libopencm3 License

Macro Definition Documentation

◆ MSC_ADDRB

#define MSC_ADDRB   MMIO32(MSC_BASE + 0x010)

Definition at line 33 of file msc_common.h.

◆ MSC_CACHEHITS

#define MSC_CACHEHITS   MMIO32(MSC_BASE + 0x044)

Definition at line 42 of file msc_common.h.

◆ MSC_CACHEMISSES

#define MSC_CACHEMISSES   MMIO32(MSC_BASE + 0x048)

Definition at line 43 of file msc_common.h.

◆ MSC_CMD

#define MSC_CMD   MMIO32(MSC_BASE + 0x040)

Definition at line 41 of file msc_common.h.

◆ MSC_CMD_INVCACHE

#define MSC_CMD_INVCACHE   (1 << 0)

Definition at line 138 of file msc_common.h.

◆ MSC_CMD_STARTPC

#define MSC_CMD_STARTPC   (1 << 1)

Definition at line 137 of file msc_common.h.

◆ MSC_CMD_STOPPC

#define MSC_CMD_STOPPC   (1 << 2)

Definition at line 136 of file msc_common.h.

◆ MSC_CTRL

#define MSC_CTRL   MMIO32(MSC_BASE + 0x000)

Definition at line 29 of file msc_common.h.

◆ MSC_CTRL_BUSFAULT

#define MSC_CTRL_BUSFAULT   (1 << 0)

Definition at line 48 of file msc_common.h.

◆ MSC_IEN

#define MSC_IEN   MMIO32(MSC_BASE + 0x038)

Definition at line 39 of file msc_common.h.

◆ MSC_IEN_CHOF

#define MSC_IEN_CHOF   (1 << 2)

Definition at line 123 of file msc_common.h.

◆ MSC_IEN_CMOF

#define MSC_IEN_CMOF   (1 << 3)

Definition at line 122 of file msc_common.h.

◆ MSC_IEN_ERASE

#define MSC_IEN_ERASE   (1 << 0)

Definition at line 125 of file msc_common.h.

◆ MSC_IEN_WRITE

#define MSC_IEN_WRITE   (1 << 1)

Definition at line 124 of file msc_common.h.

◆ MSC_IF

#define MSC_IF   MMIO32(MSC_BASE + 0x02C)

Definition at line 36 of file msc_common.h.

◆ MSC_IF_CHOF

#define MSC_IF_CHOF   (1 << 2)

Definition at line 105 of file msc_common.h.

◆ MSC_IF_CMOF

#define MSC_IF_CMOF   (1 << 3)

Definition at line 104 of file msc_common.h.

◆ MSC_IF_ERASE

#define MSC_IF_ERASE   (1 << 0)

Definition at line 107 of file msc_common.h.

◆ MSC_IF_WRITE

#define MSC_IF_WRITE   (1 << 1)

Definition at line 106 of file msc_common.h.

◆ MSC_IFC

#define MSC_IFC   MMIO32(MSC_BASE + 0x034)

Definition at line 38 of file msc_common.h.

◆ MSC_IFC_CHOF

#define MSC_IFC_CHOF   (1 << 2)

Definition at line 117 of file msc_common.h.

◆ MSC_IFC_CMOF

#define MSC_IFC_CMOF   (1 << 3)

Definition at line 116 of file msc_common.h.

◆ MSC_IFC_ERASE

#define MSC_IFC_ERASE   (1 << 0)

Definition at line 119 of file msc_common.h.

◆ MSC_IFC_WRITE

#define MSC_IFC_WRITE   (1 << 1)

Definition at line 118 of file msc_common.h.

◆ MSC_IFS

#define MSC_IFS   MMIO32(MSC_BASE + 0x030)

Definition at line 37 of file msc_common.h.

◆ MSC_IFS_CHOF

#define MSC_IFS_CHOF   (1 << 2)

Definition at line 111 of file msc_common.h.

◆ MSC_IFS_CMOF

#define MSC_IFS_CMOF   (1 << 3)

Definition at line 110 of file msc_common.h.

◆ MSC_IFS_ERASE

#define MSC_IFS_ERASE   (1 << 0)

Definition at line 113 of file msc_common.h.

◆ MSC_IFS_WRITE

#define MSC_IFS_WRITE   (1 << 1)

Definition at line 112 of file msc_common.h.

◆ MSC_LOCK

#define MSC_LOCK   MMIO32(MSC_BASE + 0x03C)

Definition at line 40 of file msc_common.h.

◆ MSC_LOCK_LOCKKEY

#define MSC_LOCK_LOCKKEY (   v)    ((v) << MSC_LOCK_LOCKKEY_SHIFT)

Definition at line 129 of file msc_common.h.

◆ MSC_LOCK_LOCKKEY_LOCK

#define MSC_LOCK_LOCKKEY_LOCK   MSC_LOCK_LOCKKEY(0)

Definition at line 132 of file msc_common.h.

◆ MSC_LOCK_LOCKKEY_LOCKED

#define MSC_LOCK_LOCKKEY_LOCKED   MSC_LOCK_LOCKKEY(1)

Definition at line 131 of file msc_common.h.

◆ MSC_LOCK_LOCKKEY_SHIFT

#define MSC_LOCK_LOCKKEY_SHIFT   (0)

Definition at line 128 of file msc_common.h.

◆ MSC_LOCK_LOCKKEY_UNLOCK

#define MSC_LOCK_LOCKKEY_UNLOCK   MSC_LOCK_LOCKKEY(0x1B71)

Definition at line 133 of file msc_common.h.

◆ MSC_LOCK_LOCKKEY_UNLOCKED

#define MSC_LOCK_LOCKKEY_UNLOCKED   MSC_LOCK_LOCKKEY(0)

Definition at line 130 of file msc_common.h.

◆ MSC_MASSLOCK

#define MSC_MASSLOCK   MMIO32(MSC_BASE + 0x054)

Definition at line 45 of file msc_common.h.

◆ MSC_MASSLOCK_LOCKKEY

#define MSC_MASSLOCK_LOCKKEY (   v)    ((v) << MSC_MASSLOCK_LOCKKEY_SHIFT)

Definition at line 150 of file msc_common.h.

◆ MSC_MASSLOCK_LOCKKEY_LOCK

#define MSC_MASSLOCK_LOCKKEY_LOCK   MSC_MASSLOCK_LOCKKEY(0)

Definition at line 153 of file msc_common.h.

◆ MSC_MASSLOCK_LOCKKEY_LOCKED

#define MSC_MASSLOCK_LOCKKEY_LOCKED   MSC_MASSLOCK_LOCKKEY(1)

Definition at line 152 of file msc_common.h.

◆ MSC_MASSLOCK_LOCKKEY_SHIFT

#define MSC_MASSLOCK_LOCKKEY_SHIFT   (0)

Definition at line 149 of file msc_common.h.

◆ MSC_MASSLOCK_LOCKKEY_UNLOCK

#define MSC_MASSLOCK_LOCKKEY_UNLOCK   MSC_MASSLOCK_LOCKKEY(0x631A)

Definition at line 154 of file msc_common.h.

◆ MSC_MASSLOCK_LOCKKEY_UNLOCKED

#define MSC_MASSLOCK_LOCKKEY_UNLOCKED   MSC_MASSLOCK_LOCKKEY(0)

Definition at line 151 of file msc_common.h.

◆ MSC_READCTRL

#define MSC_READCTRL   MMIO32(MSC_BASE + 0x004)

Definition at line 30 of file msc_common.h.

◆ MSC_READCTRL_AIDIS

#define MSC_READCTRL_AIDIS   (1 << 4)

Definition at line 66 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY

#define MSC_READCTRL_BUSSTRATEGY (   v)
Value:
MSC_READCTRL_BUSSTRATEGY_MASK)
#define MSC_READCTRL_BUSSTRATEGY_SHIFT
Definition: msc_common.h:51

Definition at line 54 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY_CPU

#define MSC_READCTRL_BUSSTRATEGY_CPU   MSC_READCTRL_BUSSTRATEGY(0)

Definition at line 58 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY_DMA

#define MSC_READCTRL_BUSSTRATEGY_DMA   MSC_READCTRL_BUSSTRATEGY(1)

Definition at line 59 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY_DMAEM1

#define MSC_READCTRL_BUSSTRATEGY_DMAEM1   MSC_READCTRL_BUSSTRATEGY(2)

Definition at line 60 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY_MASK

#define MSC_READCTRL_BUSSTRATEGY_MASK    (0x3 << MSC_READCTRL_BUSSTRATEGY_SHIFT)

Definition at line 52 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY_NONE

#define MSC_READCTRL_BUSSTRATEGY_NONE   MSC_READCTRL_BUSSTRATEGY(3)

Definition at line 61 of file msc_common.h.

◆ MSC_READCTRL_BUSSTRATEGY_SHIFT

#define MSC_READCTRL_BUSSTRATEGY_SHIFT   (16)

Definition at line 51 of file msc_common.h.

◆ MSC_READCTRL_EBICDIS

#define MSC_READCTRL_EBICDIS   (1 << 6)

Definition at line 64 of file msc_common.h.

◆ MSC_READCTRL_ICCDIS

#define MSC_READCTRL_ICCDIS   (1 << 5)

Definition at line 65 of file msc_common.h.

◆ MSC_READCTRL_IFCDIS

#define MSC_READCTRL_IFCDIS   (1 << 3)

Definition at line 67 of file msc_common.h.

◆ MSC_READCTRL_MODE

#define MSC_READCTRL_MODE (   v)     (((v) << MSC_READCTRL_MODE_SHIFT) & MSC_READCTRL_MODE_MASK)

Definition at line 71 of file msc_common.h.

◆ MSC_READCTRL_MODE_MASK

#define MSC_READCTRL_MODE_MASK   (0x7 << MSC_READCTRL_MODE_SHIFT)

Definition at line 70 of file msc_common.h.

◆ MSC_READCTRL_MODE_SHIFT

#define MSC_READCTRL_MODE_SHIFT   (0)

Definition at line 69 of file msc_common.h.

◆ MSC_READCTRL_MODE_WS0

#define MSC_READCTRL_MODE_WS0   0

Definition at line 73 of file msc_common.h.

◆ MSC_READCTRL_MODE_WS0SCBTP

#define MSC_READCTRL_MODE_WS0SCBTP   2

Definition at line 75 of file msc_common.h.

◆ MSC_READCTRL_MODE_WS1

#define MSC_READCTRL_MODE_WS1   1

Definition at line 74 of file msc_common.h.

◆ MSC_READCTRL_MODE_WS1SCBTP

#define MSC_READCTRL_MODE_WS1SCBTP   3

Definition at line 76 of file msc_common.h.

◆ MSC_READCTRL_MODE_WS2

#define MSC_READCTRL_MODE_WS2   4

Definition at line 77 of file msc_common.h.

◆ MSC_READCTRL_MODE_WS2SCBTP

#define MSC_READCTRL_MODE_WS2SCBTP   5

Definition at line 78 of file msc_common.h.

◆ MSC_READCTRL_RAMCEN

#define MSC_READCTRL_RAMCEN   (1 << 7)

Definition at line 63 of file msc_common.h.

◆ MSC_STATUS

#define MSC_STATUS   MMIO32(MSC_BASE + 0x01C)

Definition at line 35 of file msc_common.h.

◆ MSC_STATUS_BUSY

#define MSC_STATUS_BUSY   (1 << 0)

Definition at line 101 of file msc_common.h.

◆ MSC_STATUS_ERASEABORTED

#define MSC_STATUS_ERASEABORTED   (1 << 5)

Definition at line 96 of file msc_common.h.

◆ MSC_STATUS_INVADDR

#define MSC_STATUS_INVADDR   (1 << 2)

Definition at line 99 of file msc_common.h.

◆ MSC_STATUS_LOCKED

#define MSC_STATUS_LOCKED   (1 << 1)

Definition at line 100 of file msc_common.h.

◆ MSC_STATUS_PCRUNNING

#define MSC_STATUS_PCRUNNING   (1 << 6)

Definition at line 95 of file msc_common.h.

◆ MSC_STATUS_WDATAREADY

#define MSC_STATUS_WDATAREADY   (1 << 3)

Definition at line 98 of file msc_common.h.

◆ MSC_STATUS_WORDTIMEOUT

#define MSC_STATUS_WORDTIMEOUT   (1 << 4)

Definition at line 97 of file msc_common.h.

◆ MSC_TIMEBASE

#define MSC_TIMEBASE   MMIO32(MSC_BASE + 0x050)

Definition at line 44 of file msc_common.h.

◆ MSC_TIMEBASE_BASE

#define MSC_TIMEBASE_BASE (   v)     (((v) << MSC_TIMEBASE_BASE_SHIFT) & MSC_TIMEBASE_BASE_MASK)

Definition at line 145 of file msc_common.h.

◆ MSC_TIMEBASE_BASE_MASK

#define MSC_TIMEBASE_BASE_MASK   (0x3F << MSC_TIMEBASE_BASE_SHIFT)

Definition at line 144 of file msc_common.h.

◆ MSC_TIMEBASE_BASE_SHIFT

#define MSC_TIMEBASE_BASE_SHIFT   (0)

Definition at line 143 of file msc_common.h.

◆ MSC_TIMEBASE_PERIOD

#define MSC_TIMEBASE_PERIOD   (1 << 16)

Definition at line 141 of file msc_common.h.

◆ MSC_WDATA

#define MSC_WDATA   MMIO32(MSC_BASE + 0x018)

Definition at line 34 of file msc_common.h.

◆ MSC_WRITECMD

#define MSC_WRITECMD   MMIO32(MSC_BASE + 0x00C)

Definition at line 32 of file msc_common.h.

◆ MSC_WRITECMD_CLEARWDATA

#define MSC_WRITECMD_CLEARWDATA   (1 << 12)

Definition at line 85 of file msc_common.h.

◆ MSC_WRITECMD_ERASEABORT

#define MSC_WRITECMD_ERASEABORT   (1 << 5)

Definition at line 87 of file msc_common.h.

◆ MSC_WRITECMD_ERASEMAIN0

#define MSC_WRITECMD_ERASEMAIN0   (1 << 8)

Definition at line 86 of file msc_common.h.

◆ MSC_WRITECMD_ERASEPAGE

#define MSC_WRITECMD_ERASEPAGE   (1 << 1)

Definition at line 91 of file msc_common.h.

◆ MSC_WRITECMD_LADDRIM

#define MSC_WRITECMD_LADDRIM   (1 << 0)

Definition at line 92 of file msc_common.h.

◆ MSC_WRITECMD_WRITEEND

#define MSC_WRITECMD_WRITEEND   (1 << 2)

Definition at line 90 of file msc_common.h.

◆ MSC_WRITECMD_WRITEONCE

#define MSC_WRITECMD_WRITEONCE   (1 << 3)

Definition at line 89 of file msc_common.h.

◆ MSC_WRITECMD_WRITETRIG

#define MSC_WRITECMD_WRITETRIG   (1 << 4)

Definition at line 88 of file msc_common.h.

◆ MSC_WRITECTRL

#define MSC_WRITECTRL   MMIO32(MSC_BASE + 0x008)

Definition at line 31 of file msc_common.h.

◆ MSC_WRITECTRL_IRQERASEABORT

#define MSC_WRITECTRL_IRQERASEABORT   (1 << 1)

Definition at line 81 of file msc_common.h.

◆ MSC_WRITECTRL_WREN

#define MSC_WRITECTRL_WREN   (1 << 0)

Definition at line 82 of file msc_common.h.