libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
fsmc.h File Reference
Include dependency graph for fsmc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FSMC_BANK1_BASE   0x60000000U /* NOR / PSRAM */
 
#define FSMC_BANK2_BASE   0x70000000U /* NAND flash (reserved in F7) */
 
#define FSMC_BANK3_BASE   0x80000000U /* NAND flash */
 
#define FSMC_BANK4_BASE   0x90000000U /* PC card (reserved in F7) */
 
#define FSMC_BCR(x)   MMIO32(FSMC_BASE + 0x00 + 8 * (x))
 
#define FSMC_BCR1   FSMC_BCR(0)
 
#define FSMC_BCR2   FSMC_BCR(1)
 
#define FSMC_BCR3   FSMC_BCR(2)
 
#define FSMC_BCR4   FSMC_BCR(3)
 
#define FSMC_BTR(x)   MMIO32(FSMC_BASE + 0x04 + 8 * (x))
 
#define FSMC_BTR1   FSMC_BTR(0)
 
#define FSMC_BTR2   FSMC_BTR(1)
 
#define FSMC_BTR3   FSMC_BTR(2)
 
#define FSMC_BTR4   FSMC_BTR(3)
 
#define FSMC_BWTR(x)   MMIO32(FSMC_BASE + 0x104 + 8 * (x))
 
#define FSMC_BWTR1   FSMC_BWTR(0)
 
#define FSMC_BWTR2   FSMC_BWTR(1)
 
#define FSMC_BWTR3   FSMC_BWTR(2)
 
#define FSMC_BWTR4   FSMC_BWTR(3)
 
#define FSMC_PCR(x)   MMIO32(FSMC_BASE + 0x40 + 0x20 * (x))
 
#define FSMC_PCR2   FSMC_PCR(1)
 
#define FSMC_PCR3   FSMC_PCR(2)
 
#define FSMC_PCR4   FSMC_PCR(3)
 
#define FSMC_SR(x)   MMIO32(FSMC_BASE + 0x44 + 0x20 * (x))
 
#define FSMC_SR2   FSMC_SR(1)
 
#define FSMC_SR3   FSMC_SR(2)
 
#define FSMC_SR4   FSMC_SR(3)
 
#define FSMC_PMEM(x)   MMIO32(FSMC_BASE + 0x48 + 0x20 * (x))
 
#define FSMC_PMEM2   FSMC_PMEM(1)
 
#define FSMC_PMEM3   FSMC_PMEM(2)
 
#define FSMC_PMEM4   FSMC_PMEM(3)
 
#define FSMC_PATT(x)   MMIO32(FSMC_BASE + 0x4c + 0x20 * (x))
 
#define FSMC_PATT2   FSMC_PATT(1)
 
#define FSMC_PATT3   FSMC_PATT(2)
 
#define FSMC_PATT4   FSMC_PATT(3)
 
#define FSMC_PIO4   MMIO32(FSMC_BASE + 0xb0)
 
#define FSMC_ECCR(x)   MMIO32(FSMC_BASE + 0x54 + 0x20 * (x))
 
#define FSMC_ECCR2   FSMC_ECCR(1)
 
#define FSMC_ECCR3   FSMC_ECCR(2)
 
#define FSMC_BCR_CBURSTRW   (1 << 19)
 
#define FSMC_BCR_ASYNCWAIT   (1 << 15)
 
#define FSMC_BCR_EXTMOD   (1 << 14)
 
#define FSMC_BCR_WAITEN   (1 << 13)
 
#define FSMC_BCR_WREN   (1 << 12)
 
#define FSMC_BCR_WAITCFG   (1 << 11)
 
#define FSMC_BCR_WRAPMOD   (1 << 10)
 
#define FSMC_BCR_WAITPOL   (1 << 9)
 
#define FSMC_BCR_BURSTEN   (1 << 8)
 
#define FSMC_BCR_FACCEN   (1 << 6)
 
#define FSMC_BCR_MWID   (1 << 4)
 
#define FSMC_BCR_MTYP   (1 << 2)
 
#define FSMC_BCR_MUXEN   (1 << 1)
 
#define FSMC_BCR_MBKEN   (1 << 0)
 
#define FSMC_BTx_ACCMOD_A   (0)
 
#define FSMC_BTx_ACCMOD_B   (1)
 
#define FSMC_BTx_ACCMOD_C   (2)
 
#define FSMC_BTx_ACCMOD_D   (3)
 
#define FSMC_BTR_ACCMOD   (1 << 28)
 
#define FSMC_BTR_ACCMODx(x)   (((x) & 0x03) << 28)
 
#define FSMC_BTR_DATLAT   (1 << 24)
 
#define FSMC_BTR_DATLATx(x)   (((x) & 0x0f) << 24)
 
#define FSMC_BTR_CLKDIV   (1 << 20)
 
#define FSMC_BTR_CLKDIVx(x)   (((x) & 0x0f) << 20)
 
#define FSMC_BTR_BUSTURN   (1 << 16)
 
#define FSMC_BTR_BUSTURNx(x)   (((x) & 0x0f) << 16)
 
#define FSMC_BTR_DATAST   (1 << 8)
 
#define FSMC_BTR_DATASTx(x)   (((x) & 0xff) << 8)
 
#define FSMC_BTR_ADDHLD   (1 << 4)
 
#define FSMC_BTR_ADDHLDx(x)   (((x) & 0x0f) << 4)
 
#define FSMC_BTR_ADDSET   (1 << 0)
 
#define FSMC_BTR_ADDSETx(x)   (((x) & 0x0f) << 0)
 
#define FSMC_BWTR_ACCMOD   (1 << 28)
 
#define FSMC_BWTR_DATLAT   (1 << 24)
 
#define FSMC_BWTR_CLKDIV   (1 << 20)
 
#define FSMC_BWTR_DATAST   (1 << 8)
 
#define FSMC_BWTR_ADDHLD   (1 << 4)
 
#define FSMC_BWTR_ADDSET   (1 << 0)
 
#define FSMC_PCR_ECCPS   (1 << 17)
 
#define FSMC_PCR_TAR   (1 << 13)
 
#define FSMC_PCR_TCLR   (1 << 9)
 
#define FSMC_PCR_ECCEN   (1 << 6)
 
#define FSMC_PCR_PWID   (1 << 4)
 
#define FSMC_PCR_PTYP   (1 << 3)
 
#define FSMC_PCR_PBKEN   (1 << 2)
 
#define FSMC_PCR_PWAITEN   (1 << 1)
 
#define FSMC_SR_FEMPT   (1 << 6)
 
#define FSMC_SR_IFEN   (1 << 5)
 
#define FSMC_SR_ILEN   (1 << 4)
 
#define FSMC_SR_IREN   (1 << 3)
 
#define FSMC_SR_IFS   (1 << 2)
 
#define FSMC_SR_ILS   (1 << 1)
 
#define FSMC_SR_IRS   (1 << 0)
 
#define FSMC_PMEM_MEMHIZX   (1 << 24)
 
#define FSMC_PMEM_MEMHOLDX   (1 << 16)
 
#define FSMC_PMEM_MEMWAITX   (1 << 8)
 
#define FSMC_PMEM_MEMSETX   (1 << 0)
 
#define FSMC_PATT_ATTHIZX   (1 << 24)
 
#define FSMC_PATT_ATTHOLDX   (1 << 16)
 
#define FSMC_PATT_ATTWAITX   (1 << 8)
 
#define FSMC_PATT_ATTSETX   (1 << 0)
 
#define FSMC_PIO4_IOHIZX   (1 << 24)
 
#define FSMC_PIO4_IOHOLDX   (1 << 16)
 
#define FSMC_PIO4_IOWAITX   (1 << 8)
 
#define FSMC_PIO4_IOSETX   (1 << 0)
 
#define FSMC_ECCR_ECCX   (1 << 0)
 

Macro Definition Documentation

◆ FSMC_BANK1_BASE

#define FSMC_BANK1_BASE   0x60000000U /* NOR / PSRAM */

Definition at line 35 of file fsmc.h.

◆ FSMC_BANK2_BASE

#define FSMC_BANK2_BASE   0x70000000U /* NAND flash (reserved in F7) */

Definition at line 36 of file fsmc.h.

◆ FSMC_BANK3_BASE

#define FSMC_BANK3_BASE   0x80000000U /* NAND flash */

Definition at line 37 of file fsmc.h.

◆ FSMC_BANK4_BASE

#define FSMC_BANK4_BASE   0x90000000U /* PC card (reserved in F7) */

Definition at line 38 of file fsmc.h.

◆ FSMC_BCR

#define FSMC_BCR (   x)    MMIO32(FSMC_BASE + 0x00 + 8 * (x))

Definition at line 43 of file fsmc.h.

◆ FSMC_BCR1

#define FSMC_BCR1   FSMC_BCR(0)

Definition at line 44 of file fsmc.h.

◆ FSMC_BCR2

#define FSMC_BCR2   FSMC_BCR(1)

Definition at line 45 of file fsmc.h.

◆ FSMC_BCR3

#define FSMC_BCR3   FSMC_BCR(2)

Definition at line 46 of file fsmc.h.

◆ FSMC_BCR4

#define FSMC_BCR4   FSMC_BCR(3)

Definition at line 47 of file fsmc.h.

◆ FSMC_BCR_ASYNCWAIT

#define FSMC_BCR_ASYNCWAIT   (1 << 15)

Definition at line 105 of file fsmc.h.

◆ FSMC_BCR_BURSTEN

#define FSMC_BCR_BURSTEN   (1 << 8)

Definition at line 126 of file fsmc.h.

◆ FSMC_BCR_CBURSTRW

#define FSMC_BCR_CBURSTRW   (1 << 19)

Definition at line 100 of file fsmc.h.

◆ FSMC_BCR_EXTMOD

#define FSMC_BCR_EXTMOD   (1 << 14)

Definition at line 108 of file fsmc.h.

◆ FSMC_BCR_FACCEN

#define FSMC_BCR_FACCEN   (1 << 6)

Definition at line 131 of file fsmc.h.

◆ FSMC_BCR_MBKEN

#define FSMC_BCR_MBKEN   (1 << 0)

Definition at line 143 of file fsmc.h.

◆ FSMC_BCR_MTYP

#define FSMC_BCR_MTYP   (1 << 2)

Definition at line 137 of file fsmc.h.

◆ FSMC_BCR_MUXEN

#define FSMC_BCR_MUXEN   (1 << 1)

Definition at line 140 of file fsmc.h.

◆ FSMC_BCR_MWID

#define FSMC_BCR_MWID   (1 << 4)

Definition at line 134 of file fsmc.h.

◆ FSMC_BCR_WAITCFG

#define FSMC_BCR_WAITCFG   (1 << 11)

Definition at line 117 of file fsmc.h.

◆ FSMC_BCR_WAITEN

#define FSMC_BCR_WAITEN   (1 << 13)

Definition at line 111 of file fsmc.h.

◆ FSMC_BCR_WAITPOL

#define FSMC_BCR_WAITPOL   (1 << 9)

Definition at line 123 of file fsmc.h.

◆ FSMC_BCR_WRAPMOD

#define FSMC_BCR_WRAPMOD   (1 << 10)

Definition at line 120 of file fsmc.h.

◆ FSMC_BCR_WREN

#define FSMC_BCR_WREN   (1 << 12)

Definition at line 114 of file fsmc.h.

◆ FSMC_BTR

#define FSMC_BTR (   x)    MMIO32(FSMC_BASE + 0x04 + 8 * (x))

Definition at line 50 of file fsmc.h.

◆ FSMC_BTR1

#define FSMC_BTR1   FSMC_BTR(0)

Definition at line 51 of file fsmc.h.

◆ FSMC_BTR2

#define FSMC_BTR2   FSMC_BTR(1)

Definition at line 52 of file fsmc.h.

◆ FSMC_BTR3

#define FSMC_BTR3   FSMC_BTR(2)

Definition at line 53 of file fsmc.h.

◆ FSMC_BTR4

#define FSMC_BTR4   FSMC_BTR(3)

Definition at line 54 of file fsmc.h.

◆ FSMC_BTR_ACCMOD

#define FSMC_BTR_ACCMOD   (1 << 28)

Definition at line 156 of file fsmc.h.

◆ FSMC_BTR_ACCMODx

#define FSMC_BTR_ACCMODx (   x)    (((x) & 0x03) << 28)

Definition at line 157 of file fsmc.h.

◆ FSMC_BTR_ADDHLD

#define FSMC_BTR_ADDHLD   (1 << 4)

Definition at line 176 of file fsmc.h.

◆ FSMC_BTR_ADDHLDx

#define FSMC_BTR_ADDHLDx (   x)    (((x) & 0x0f) << 4)

Definition at line 177 of file fsmc.h.

◆ FSMC_BTR_ADDSET

#define FSMC_BTR_ADDSET   (1 << 0)

Definition at line 180 of file fsmc.h.

◆ FSMC_BTR_ADDSETx

#define FSMC_BTR_ADDSETx (   x)    (((x) & 0x0f) << 0)

Definition at line 181 of file fsmc.h.

◆ FSMC_BTR_BUSTURN

#define FSMC_BTR_BUSTURN   (1 << 16)

Definition at line 168 of file fsmc.h.

◆ FSMC_BTR_BUSTURNx

#define FSMC_BTR_BUSTURNx (   x)    (((x) & 0x0f) << 16)

Definition at line 169 of file fsmc.h.

◆ FSMC_BTR_CLKDIV

#define FSMC_BTR_CLKDIV   (1 << 20)

Definition at line 164 of file fsmc.h.

◆ FSMC_BTR_CLKDIVx

#define FSMC_BTR_CLKDIVx (   x)    (((x) & 0x0f) << 20)

Definition at line 165 of file fsmc.h.

◆ FSMC_BTR_DATAST

#define FSMC_BTR_DATAST   (1 << 8)

Definition at line 172 of file fsmc.h.

◆ FSMC_BTR_DATASTx

#define FSMC_BTR_DATASTx (   x)    (((x) & 0xff) << 8)

Definition at line 173 of file fsmc.h.

◆ FSMC_BTR_DATLAT

#define FSMC_BTR_DATLAT   (1 << 24)

Definition at line 160 of file fsmc.h.

◆ FSMC_BTR_DATLATx

#define FSMC_BTR_DATLATx (   x)    (((x) & 0x0f) << 24)

Definition at line 161 of file fsmc.h.

◆ FSMC_BTx_ACCMOD_A

#define FSMC_BTx_ACCMOD_A   (0)

Definition at line 150 of file fsmc.h.

◆ FSMC_BTx_ACCMOD_B

#define FSMC_BTx_ACCMOD_B   (1)

Definition at line 151 of file fsmc.h.

◆ FSMC_BTx_ACCMOD_C

#define FSMC_BTx_ACCMOD_C   (2)

Definition at line 152 of file fsmc.h.

◆ FSMC_BTx_ACCMOD_D

#define FSMC_BTx_ACCMOD_D   (3)

Definition at line 153 of file fsmc.h.

◆ FSMC_BWTR

#define FSMC_BWTR (   x)    MMIO32(FSMC_BASE + 0x104 + 8 * (x))

Definition at line 57 of file fsmc.h.

◆ FSMC_BWTR1

#define FSMC_BWTR1   FSMC_BWTR(0)

Definition at line 58 of file fsmc.h.

◆ FSMC_BWTR2

#define FSMC_BWTR2   FSMC_BWTR(1)

Definition at line 59 of file fsmc.h.

◆ FSMC_BWTR3

#define FSMC_BWTR3   FSMC_BWTR(2)

Definition at line 60 of file fsmc.h.

◆ FSMC_BWTR4

#define FSMC_BWTR4   FSMC_BWTR(3)

Definition at line 61 of file fsmc.h.

◆ FSMC_BWTR_ACCMOD

#define FSMC_BWTR_ACCMOD   (1 << 28)

Definition at line 188 of file fsmc.h.

◆ FSMC_BWTR_ADDHLD

#define FSMC_BWTR_ADDHLD   (1 << 4)

Definition at line 202 of file fsmc.h.

◆ FSMC_BWTR_ADDSET

#define FSMC_BWTR_ADDSET   (1 << 0)

Definition at line 205 of file fsmc.h.

◆ FSMC_BWTR_CLKDIV

#define FSMC_BWTR_CLKDIV   (1 << 20)

Definition at line 194 of file fsmc.h.

◆ FSMC_BWTR_DATAST

#define FSMC_BWTR_DATAST   (1 << 8)

Definition at line 199 of file fsmc.h.

◆ FSMC_BWTR_DATLAT

#define FSMC_BWTR_DATLAT   (1 << 24)

Definition at line 191 of file fsmc.h.

◆ FSMC_ECCR

#define FSMC_ECCR (   x)    MMIO32(FSMC_BASE + 0x54 + 0x20 * (x))

Definition at line 91 of file fsmc.h.

◆ FSMC_ECCR2

#define FSMC_ECCR2   FSMC_ECCR(1)

Definition at line 92 of file fsmc.h.

◆ FSMC_ECCR3

#define FSMC_ECCR3   FSMC_ECCR(2)

Definition at line 93 of file fsmc.h.

◆ FSMC_ECCR_ECCX

#define FSMC_ECCR_ECCX   (1 << 0)

Definition at line 309 of file fsmc.h.

◆ FSMC_PATT

#define FSMC_PATT (   x)    MMIO32(FSMC_BASE + 0x4c + 0x20 * (x))

Definition at line 82 of file fsmc.h.

◆ FSMC_PATT2

#define FSMC_PATT2   FSMC_PATT(1)

Definition at line 83 of file fsmc.h.

◆ FSMC_PATT3

#define FSMC_PATT3   FSMC_PATT(2)

Definition at line 84 of file fsmc.h.

◆ FSMC_PATT4

#define FSMC_PATT4   FSMC_PATT(3)

Definition at line 85 of file fsmc.h.

◆ FSMC_PATT_ATTHIZX

#define FSMC_PATT_ATTHIZX   (1 << 24)

Definition at line 281 of file fsmc.h.

◆ FSMC_PATT_ATTHOLDX

#define FSMC_PATT_ATTHOLDX   (1 << 16)

Definition at line 284 of file fsmc.h.

◆ FSMC_PATT_ATTSETX

#define FSMC_PATT_ATTSETX   (1 << 0)

Definition at line 290 of file fsmc.h.

◆ FSMC_PATT_ATTWAITX

#define FSMC_PATT_ATTWAITX   (1 << 8)

Definition at line 287 of file fsmc.h.

◆ FSMC_PCR

#define FSMC_PCR (   x)    MMIO32(FSMC_BASE + 0x40 + 0x20 * (x))

Definition at line 64 of file fsmc.h.

◆ FSMC_PCR2

#define FSMC_PCR2   FSMC_PCR(1)

Definition at line 65 of file fsmc.h.

◆ FSMC_PCR3

#define FSMC_PCR3   FSMC_PCR(2)

Definition at line 66 of file fsmc.h.

◆ FSMC_PCR4

#define FSMC_PCR4   FSMC_PCR(3)

Definition at line 67 of file fsmc.h.

◆ FSMC_PCR_ECCEN

#define FSMC_PCR_ECCEN   (1 << 6)

Definition at line 223 of file fsmc.h.

◆ FSMC_PCR_ECCPS

#define FSMC_PCR_ECCPS   (1 << 17)

Definition at line 212 of file fsmc.h.

◆ FSMC_PCR_PBKEN

#define FSMC_PCR_PBKEN   (1 << 2)

Definition at line 232 of file fsmc.h.

◆ FSMC_PCR_PTYP

#define FSMC_PCR_PTYP   (1 << 3)

Definition at line 229 of file fsmc.h.

◆ FSMC_PCR_PWAITEN

#define FSMC_PCR_PWAITEN   (1 << 1)

Definition at line 235 of file fsmc.h.

◆ FSMC_PCR_PWID

#define FSMC_PCR_PWID   (1 << 4)

Definition at line 226 of file fsmc.h.

◆ FSMC_PCR_TAR

#define FSMC_PCR_TAR   (1 << 13)

Definition at line 215 of file fsmc.h.

◆ FSMC_PCR_TCLR

#define FSMC_PCR_TCLR   (1 << 9)

Definition at line 218 of file fsmc.h.

◆ FSMC_PIO4

#define FSMC_PIO4   MMIO32(FSMC_BASE + 0xb0)

Definition at line 88 of file fsmc.h.

◆ FSMC_PIO4_IOHIZX

#define FSMC_PIO4_IOHIZX   (1 << 24)

Definition at line 295 of file fsmc.h.

◆ FSMC_PIO4_IOHOLDX

#define FSMC_PIO4_IOHOLDX   (1 << 16)

Definition at line 298 of file fsmc.h.

◆ FSMC_PIO4_IOSETX

#define FSMC_PIO4_IOSETX   (1 << 0)

Definition at line 304 of file fsmc.h.

◆ FSMC_PIO4_IOWAITX

#define FSMC_PIO4_IOWAITX   (1 << 8)

Definition at line 301 of file fsmc.h.

◆ FSMC_PMEM

#define FSMC_PMEM (   x)    MMIO32(FSMC_BASE + 0x48 + 0x20 * (x))

Definition at line 76 of file fsmc.h.

◆ FSMC_PMEM2

#define FSMC_PMEM2   FSMC_PMEM(1)

Definition at line 77 of file fsmc.h.

◆ FSMC_PMEM3

#define FSMC_PMEM3   FSMC_PMEM(2)

Definition at line 78 of file fsmc.h.

◆ FSMC_PMEM4

#define FSMC_PMEM4   FSMC_PMEM(3)

Definition at line 79 of file fsmc.h.

◆ FSMC_PMEM_MEMHIZX

#define FSMC_PMEM_MEMHIZX   (1 << 24)

Definition at line 267 of file fsmc.h.

◆ FSMC_PMEM_MEMHOLDX

#define FSMC_PMEM_MEMHOLDX   (1 << 16)

Definition at line 270 of file fsmc.h.

◆ FSMC_PMEM_MEMSETX

#define FSMC_PMEM_MEMSETX   (1 << 0)

Definition at line 276 of file fsmc.h.

◆ FSMC_PMEM_MEMWAITX

#define FSMC_PMEM_MEMWAITX   (1 << 8)

Definition at line 273 of file fsmc.h.

◆ FSMC_SR

#define FSMC_SR (   x)    MMIO32(FSMC_BASE + 0x44 + 0x20 * (x))

Definition at line 70 of file fsmc.h.

◆ FSMC_SR2

#define FSMC_SR2   FSMC_SR(1)

Definition at line 71 of file fsmc.h.

◆ FSMC_SR3

#define FSMC_SR3   FSMC_SR(2)

Definition at line 72 of file fsmc.h.

◆ FSMC_SR4

#define FSMC_SR4   FSMC_SR(3)

Definition at line 73 of file fsmc.h.

◆ FSMC_SR_FEMPT

#define FSMC_SR_FEMPT   (1 << 6)

Definition at line 244 of file fsmc.h.

◆ FSMC_SR_IFEN

#define FSMC_SR_IFEN   (1 << 5)

Definition at line 247 of file fsmc.h.

◆ FSMC_SR_IFS

#define FSMC_SR_IFS   (1 << 2)

Definition at line 256 of file fsmc.h.

◆ FSMC_SR_ILEN

#define FSMC_SR_ILEN   (1 << 4)

Definition at line 250 of file fsmc.h.

◆ FSMC_SR_ILS

#define FSMC_SR_ILS   (1 << 1)

Definition at line 259 of file fsmc.h.

◆ FSMC_SR_IREN

#define FSMC_SR_IREN   (1 << 3)

Definition at line 253 of file fsmc.h.

◆ FSMC_SR_IRS

#define FSMC_SR_IRS   (1 << 0)

Definition at line 262 of file fsmc.h.