32. Flexible memory controller (FMC)

The flexible memory controller (FMC) includes two memory controllers:

32.1 FMC main features

The FMC functional block makes the interface with: synchronous and asynchronous static memories, and NAND flash memory. Its main purposes are:

All external memories share the addresses, data and control signals with the controller. Each external device is accessed by means of a unique Chip Select. The FMC performs only one access at a time to an external device.

The main features of the FMC are the following:

At startup the FMC pins must be configured by the user application. The FMC input/output pins which are not used by the application can be used for other purposes.

After reset, the FMC is disabled. Once all the used memory controllers are configured, the FMC must be enabled by setting the FMCEN bit.

The FMC registers that define the external device type and associated characteristics are set at boot time and do not change until the next reset or power-up. If some registers have to be re-configured, the FMC must be disabled (FMCEN bit set to 0x0). However, only few bits can be changed on the fly:

If some parameters have to be modified while the FMC is enabled, the FMC must be first disabled so that no further access is allowed to any memory controller during register modification. Once all needed configurations are updated, enable the FMC as follows:

  1. 1. Disable FMC by resetting the FMCEN bit.
  2. 2. Wait ISOST[1:0] bits in FMC_SR register to be set to 0b11.
  3. 3. Wait until PEF flag is set in the FMC_SR register.
  4. 4. Program the registers with new values.
  5. 5. Enable the FMC by setting the FMCEN bit.

32.2 FMC implementation

Table 220. FMC features

Modes/featuresFMC
NAND flash chip-select outputs4
NAND flash RNBx inputs1
NAND/NOR flash with common WAIT pinNo

32.3 FMC block diagram

The FMC consists of the following main blocks:

The block diagram is shown in the below figure.

Figure 172. FMC block diagram Figure 172. FMC block diagram. The diagram shows the internal structure of the Flexible Memory Controller (FMC). On the left, external inputs include fmc_hclk and fmc_ker_ck. A 32-bit AHB bus and a 64-bit AXI bus connect to the internal AXI/AHB configuration registers. The FMC contains two memory controllers: a NOR/PSRAM memory controller and a NAND memory controller. On the right, various signals are output: FMC_NL (or NADV) and FMC_CLK for NOR/PSRAM signals; FMC_NBL[1:0] for Shared signals; FMC_A[25:0], FMC_D[15:0], FMC_NOE, and FMC_NWAIT for Shared signals; FMC_NE[4:1] and FMC_NWE for Shared signals; FMC_NCE[4:1] for NAND signals; and FMC_RNB. Label MSv63997V5 is in the lower right.
Figure 172. FMC block diagram. The diagram shows the internal structure of the Flexible Memory Controller (FMC). On the left, external inputs include fmc_hclk and fmc_ker_ck. A 32-bit AHB bus and a 64-bit AXI bus connect to the internal AXI/AHB configuration registers. The FMC contains two memory controllers: a NOR/PSRAM memory controller and a NAND memory controller. On the right, various signals are output: FMC_NL (or NADV) and FMC_CLK for NOR/PSRAM signals; FMC_NBL[1:0] for Shared signals; FMC_A[25:0], FMC_D[15:0], FMC_NOE, and FMC_NWAIT for Shared signals; FMC_NE[4:1] and FMC_NWE for Shared signals; FMC_NCE[4:1] for NAND signals; and FMC_RNB. Label MSv63997V5 is in the lower right.
  1. 1. The FMC features four NCEx chip select outputs.

32.4 FMC internal signals

Table 221 gives the list of FMC internal signals. FMC pins (or external signals) are described in Section 32.10.1: External memory interface signals.

Table 221. FMC internal signals
NamesSignal typeDescription
fmc_nand_itDigital outputFMC NAND flash interrupt
fmc_ker_ckDigital inputFMC kernel clock
fmc_hclkDigital inputFMC interface clock
fmc_nand_txrx_dmaDigital outputDMA request for reading or writing data from/to NAND flash memory
fmc_nand_bch_dmaDigital outputDMA request for BCH results

32.5 AHB interface

The AHB slave interface allows internal CPUs to configure the FMC registers.

The AHB clock (HCLK) is the reference clock for the FMC register accesses.

The FMC registers must be accessed by words (32 bits). For non 32-bit AHB accesses, FMC does not return an AHB bus error and the register value can be corrupted.

32.6 AXI interface

The AXI slave interface allows internal CPUs and other bus master peripherals to access the external memories.

AXI transactions are translated into the external device protocol. As the AXI data bus is 64-bit wide, the AXI transactions might be split into several consecutive 32- or 16- or 8-bit accesses according to data size accesses.

The FMC generates an AXI slave error when one of the following conditions is met:

The kernel clock for the FMC is the asynchronous fmc_ker_ck clock (refer the Reset and Clock control (RCC) section for details on fmc_ker_ck clock source selection).

32.6.1 Supported memories and transactions

General transaction rules

The requested AXI transaction data size can be 8-, 16-, 32- or 64-bit wide whereas the accessed external device has a fixed data width. This may lead to inconsistent transfers.

Therefore, some simple transaction rules must be followed:

Wrap support for NOR flash/PSRAM

Synchronous memories must be configured in Linear burst mode of undefined length as not all masters can issue wrap transactions.

If a master generates a wrap transaction:

Configuration registers

The FMC can be configured through a set of registers. Refer to Section 32.10.6, for a detailed description of the NOR flash/PSRAM controller registers. Refer to Section 32.11.9, for a detailed description of the NAND flash registers.

32.7 External device address mapping

From the FMC point of view, the external memory is divided into fixed-size memory regions of 256 Mbytes each (see Table 222):

Note: The Memory region 1 type attribute must be declared as 'device'.

For each memory region, the type of memory to be used can be configured by the user application through the Configuration register.

Table 222. FMC memory regions (default mapping)

AddressMemory regionSupported memory type
0x6000 0000 - 0x6FFF FFFFMemory region 1NOR flash memory/PSRAM/SRAM

32.7.1 NOR/PSRAM address mapping

ADDR[27:26] bits are used to select one of the four memory subregions as shown in Table 223.

Table 223. NOR/PSRAM subregion selection

ADDR[27:26](1)Selected subregion
00Subregion 1 - NOR/PSRAM 1
01Subregion 2 - NOR/PSRAM 2
10Subregion 3- NOR/PSRAM 3
11Subregion 4- NOR/PSRAM 4

1. ADDR are internal address lines that are translated to external memory.

The ADDR[25:0] bits contain the external memory address. Since ADDR is a byte address whereas the memory is addressed at word level, the address actually issued to the memory varies according to the memory data width, as shown in the following table.

Table 224. NOR/PSRAM External memory address
Memory width(1)Data address issued to the memoryMaximum memory capacity (bits)
8-bitADDR[25:0]64 Mbytes * 8 = 512 Mbit
16-bitADDR[25:1] >> 164 Mbytes/2 * 16 = 512 Mbit
  1. 1. In case of a 16-bit external memory width, the FMC internally uses ADDR[25:1] to generate the address for external memory FMC_A[24:0].
    Whatever the external memory width, FMC_A[0] must be connected to external memory address A[0].

32.7.2 NAND flash memory address mapping

The 4 Kbyte NAND flash address bits are mapped according to Table 225.

Table 225. NAND access memory map
Address fieldFMC signal nameFunctionDetailed description
ADDR[11:10]NCExNAND chip enable selection00: NCE1
01: NCE2
10: NCE3
11: NCE4
ADDR[9:8]-Reserved-
ADDR[7]-Timing selection0: Common space, timing defined by FMC_PMEM
1: Attribute space, timing defined by FMC_PATT
ADDR[6]-Reserved-
ADDR[5]A[17]Address (ALE)00: Data section
01: Command section
10: Address section
11: reserved
ADDR[4](1)A[16]Command (CLE)
  1. 1. Four address LSBs are don't care: each section has 16 bytes mapped to the alias region.

The application software uses the 3 sections to access the NAND flash memory:

Since the NAND flash memory automatically increments addresses, there is no need to increment the address of the data section to access consecutive memory locations.

Note: The NAND region has to be accessed as a device and not as memory. Write accesses to command and address sections must be done in Byte mode and aligned with the section base address (offset = 0).

Read and Write accesses to NAND data section must be in Byte mode for 8-bit NAND flash memories and Byte or Half-word mode for 16-bit NAND flash memories.

Read and Write bursts must start at section base address (offset = 0) and must not cross the 16-byte section boundary.

32.8 FMC security and isolation

The FMC supports security and isolation compliant with the Resource Isolation Framework (RIF). Refer to Section Resource Isolation Framework (RIF).

From RIF view point, the FMC is composed of several independent resources, listed below, which can be assigned to different security and compartment domains. They are referenced by an index in the RIF programming model:

Note: Only the current NAND controller owner is notified by an interrupt and able to clear it. This owner can be any CID if no filtering is used (CFEN = 0 in FMC_CIDCFGRx), SCID if filtering is used (CFEN = 1) or SEMCID if both filtering and semaphore are used (CFEN = 1 and SEMEN = 1) and if SEM_MUTEX = 1. No interrupt is issued when SEM_MUTEX = 0 as there is no owner. In case of sharing with MUTEX, it is mandatory that the owner releases the NAND flash memory resource in a clean state, that is after all pending interrupts have been cleared and masked.

The FMC RIF-compliant security and isolation supports:

Resource access definition is set through dedicated registers:

By default, all FMC resources are non-secure, unprivileged, they can be accessed in read/write mode by any master, and CID based filtering is disabled.

Trusted domain (TDCID secure, privileged) can configure compartment IDs for FMC resources through FMC_CIDCFGRx registers.

RIF-compliant FMC security and Isolation also supports the following features:

Register accesses are defined in Table 226, where:

TD: written only by the trusted domain according to its TDCID

C: bitwise filtering is conditioned to the corresponding register (FMC_SECCFGR, FMC_PRIVCFGR, or FMC_CIDCFGR), all filters must pass.

Y: filtering according to security and privilege

N: no filtering is applied

Table 226. FMC RIF register properties and definitions

RegistersSecurityPrivilegeCIDRegisters used for access definition
FMC_CFGRCCC(1)FMC_SECCFGR.SEC0,
FMC_SECCFGR.PRIV0,
FMC_RCFGLOCKR.LOCK0,
FMC_CIDCFGR0, FMC_SEMCR0
FMC_BRCR1,
FMC_BRTR1, FMC_BWTR1
CCCFMC_SECCFGR.SEC1,
FMC_SECCFGR.PRIV1,
FMC_RCFGLOCKR.LOCK1,
FMC_CIDCFGR1, FMC_SEMCR1
FMC_BRCR2,
FMC_BRTR2, FMC_BWTR2
CCCFMC_SECCFGR.SEC2,
FMC_SECCFGR.PRIV2,
FMC_RCFGLOCKR.LOCK2,
FMC_CIDCFGR2, FMC_SEMCR2
FMC_BRCR3,
FMC_BRTR3, FMC_BWTR3
CCCFMC_SECCFGR.SEC3,
FMC_SECCFGR.PRIV3,
FMC_RCFGLOCKR.LOCK3,
FMC_CIDCFGR3, FMC_SEMCR3

Table 226. FMC RIF register properties and definitions (continued)

RegistersSecurityPrivilegeCIDRegisters used for access definition
FMC_BRCR4,
FMC_BRTR4, FMC_BWTR4
CCCFMC_SECCFGR.SEC4,
FMC_SECCFGR.PRIV4,
FMC_RCFGLOCKR.LOCK4,
FMC_CIDCFGR4, FMC_SEMCR4
FMC_PCR,
FMC_PMEM, FMC_PATT,
FMC_PATT,
FMC_HPR,
FMC_HECCR,
FMC_CSQCR1/2/3,
FMC_CSQAR1/2,
FMC_CSQEMSR, FMC_CSQIER,
FMC_CSQISR, FMC_CSQICR,
FMC_BCHIER,
FMC_BCHISR,
FMC_BCHICR,
FMC_BCHPB1/2/3/4
FMC_BCHDSR0/1/2/3/4
CCCFMC_SECCFGR.SEC5,
FMC_SECCFGR.PRIV5,
FMC_RCFGLOCKR.LOCK5,
FMC_CIDCFGR5, FMC_SEMCR5
FMC_SR, FMC_HWCFGR1,
FMC_HWCFGR2,
FMC_HWCFGR3, FMC_VERR,
FMC_IPIDR, FMC_SIDR
NNNRead -only, read by all
FMC_SECCFGRYYCBit write only by assigned CID according to FMC_CIDCFGR, FMC_SEMCR and by DDCID according to DDEN.
Read by all.
FMC_PRIVCFGRCYCBit write only by assigned CID according to FMC_CIDCFGR, FMC_SEMCR and by DDCID according to DDEN and security configuration.
Read by all.
FMC_RCFGLOCKRYYTD(1)Read by all.
FMC_CIDCFGRxYYTD(1)Read by all.
FMC_SEMCRxCCCRead by all.

1. The debug domain (according to DDCID and RIF DDEN signal) can access all registers when passing secure and privilege filtering.

32.9 FMC RIF registers

32.9.1 FMC security configuration register (FMC_SECCFGR)

Address offset: 0x300

Reset value: 0x0000 0000

Non-secure or unprivileged write accesses to this register are ignored. Read accesses are allowed.

If compartment filtering is enabled (respectively disabled), only trusted domain, secure debug domain (CID) or an allowed secure privileged compartment (respectively any secure privileged compartment) can write to this register.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEC5SEC4SEC3SEC2SEC1SEC0
rwrwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 Reserved, must be kept at reset value.

Bit 5 SEC5: Security configuration for NAND controller

0: non-secure

1: secure

Bit 4 SEC4: Security state for NOR/PSRAM controller for Chip Select NE4

0: non-secure

1: secure

Bit 3 SEC3: Security state for NOR/PSRAM controller for Chip Select NE3

0: non-secure

1: secure

Bit 2 SEC2: Security state for NOR/PSRAM controller for Chip Select NE2

0: non-secure

1: secure

Bit 1 SEC1: Security state for NOR/PSRAM controller for Chip Select NE1

0: non-secure

1: secure

Bit 0 SEC0: Security state for FMC_CFGR common control register

0: non-secure

1: secure

32.9.2 FMC security configuration register (FMC_PRIVCFGR)

Address offset: 0x304

Reset value: 0x0000 0000

Non-secure or unprivileged write accesses to this register are ignored. Read accesses are allowed.

If compartment filtering is enabled (respectively disabled), only trusted domain, secure debug domain (CID) or an allowed secure privileged compartment (respectively any secure privileged compartment) can write to this register.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PRIV5PRIV4PRIV3PRIV2PRIV1PRIV0
rwrwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 Reserved, must be kept at reset value.

Bit 5 PRIV5: Privileged state for NAND controller

Bit 4 PRIV4: Privileged state for NOR/PSRAM controller for Chip Select NE4

Bit 3 PRIV3: Privileged state for NOR/PSRAM controller for Chip Select NE3

Bit 2 PRIV2: Privileged state for NOR/PSRAM controller for Chip Select NE2

Bit 1 PRIV1: Privileged state for NOR/PSRAM controller for Chip Select NE1

Bit 0 PRIV0: Privileged state for common control: FMC_CFGR

32.9.3 FMC CID configuration lock register (FMC_RCFGLOCKR)

Address offset: 0x308

Reset value: 0x0000 0000

Only secure privileged write accesses to this register are allowed. This register can be written only by trusted domain and debug domain (CID). Read accesses are allowed.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LOCK5LOCK4LOCK3LOCK2LOCK1LOCK0
rsrsrsrsrsrs

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 Reserved, must be kept at reset value.

Bit 5 LOCK5: Lock NAND controller until a global FMC reset

0: no effect

1: FMC_CIDCFGR5, SEC[5] of FMC_SECCFGR and FMC_PRIVCFGR[5] are write locked

Bit 4 LOCK4: Lock NOR/PSRAM controller for Chip Select NE4 until a global FMC reset

0: no effect

1: FMC_CIDCFGR4, SEC[4] of FMC_SECCFGR and FMC_PRIVCFGR[4] are write locked

Bit 3 LOCK3: Lock NOR/PSRAM controller for Chip Select NE3 until a global FMC reset

0: no effect

1: FMC_CIDCFGR3, SEC[3] of FMC_SECCFGR and FMC_PRIVCFGR[3] are write locked

Bit 2 LOCK2: Lock NOR/PSRAM controller for Chip Select NE2 until a global FMC reset

0: no effect

1: FMC_CIDCFGR2, SEC[2] of FMC_SECCFGR and FMC_PRIVCFGR[2] are write locked

Bit 1 LOCK1: Lock NOR/PSRAM controller for Chip Select NE1 until a global FMC reset

0: no effect

1: FMC_CIDCFGR1, SEC[1] of FMC_SECCFGR and FMC_PRIVCFGR[1] are write locked

Bit 0 LOCK0: Lock FMC_CFGR until a global FMC reset

0: no effect

1: FMC_CIDCFGR0, SEC[0] of FMC_SECCFGR and FMC_PRIVCFGR[0] are write locked

32.9.4 FMC resource x CID register (FMC_CIDCFGRx)

Address offset: 0x30C + 0x8 * x (x = 0 to 5)

Reset value: 0x0000 0000

x designates an FMC resource with associated registers:

x = 0: FMC common control, FMC_CFGR

x = 1: NOR/PSRAM controller for Chip Select NE1 and its memory map address space

x = 2: NOR/PSRAM controller for Chip Select NE2 and its memory map address space

x = 3: NOR/PSRAM controller for Chip Select NE3 and its memory map address space

x = 4: NOR/PSRAM controller for Chip Select NE4 and its memory map address space

x = 5: NAND controller and its memory map address space

Only secure privileged write accesses to this register are allowed. This register can be written only by trusted domain and debug domain (CID) provided LOCKx is cleared in FMC_RCFGLOCKR register.

Read accesses from this register are allowed.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.SEMWLC7SEMWLC6SEMWLC5SEMWLC4SEMWLC3SEMWLC2SEMWLC1SEMWLC0
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]Res.Res.SEMENCFEN
rwrwrwrwrw

Bits 31:24 Reserved, must be kept at reset value.

Bit 23 SEMWLC7: White-listed CID in the CID allocation pool for resource x in semaphore mode

0: CID7 is black-listed in CID allocation pool

1: CID7 is white-listed in CID allocation pool

Bit 22 SEMWLC6: White-listed CID0 in the CID allocation pool for resource x in semaphore mode

0: CID6 is black-listed in CID allocation pool

1: CID6 is white-listed in CID allocation pool

Bit 21 SEMWLC5: White-listed CID0 in the CID allocation pool of resource x in semaphore mode

0: CID5 is black-listed in CID allocation pool

1: CID5 is white-listed in CID allocation pool

Bit 20 SEMWLC4: White-listed CID0 in the CID allocation pool of resource x in semaphore mode

0: CID4 is black-listed in CID allocation pool

1: CID4 is white-listed in CID allocation pool

Bit 19 SEMWLC3: White-listed CID in the CID allocation pool of resource x in semaphore mode

0: CID3 is black-listed in CID allocation pool

1: CID3 is white-listed in CID allocation pool

32.9.5 FMC resource x semaphore control register (FMC_SEMCRx)

Address offset: 0x310+x*0x8 (x = 0 to 5)

Reset value: 0x0000 0000

x designates an FMC resource with associated registers:

When the secure, privileged and trusted domain has set up resource x in semaphore mode (SEMEN=1 in FMC_CIDCFGRx), the FMC_SEMCRx register can be used during runtime by any authorized white-listed CID agent to take and release the control of resource x.

Read accesses can be privileged or unprivileged, secure or non-secure, and with any CID.

Write accesses are ignored if CFEN = 0 or SEMEN = 0 in FMC_CIDCFGRx.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]Res.Res.Res.SEM_MUTEX
rrrrw

Bits 31:7 Reserved, must be kept at reset value.

Bits 6:4 SEMCID[2:0]: Current CID allocated to resource x in semaphore mode

The field is read-only. It is internally updated when a white-listed CID has taken the control of resource x, in semaphore mode. If SEM_MUTEX=0, this CID also released it.

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 SEM_MUTEX: Mutex for the CID allocation of resource x in semaphore mode

Write access:

Write 0: Control of resource x (in semaphore mode) released to any white-listed CID

Write 1: Control of resource x (in semaphore mode) acquired by a white-listed CID

Read access:

Read 0: Resource x is CID-free, meaning that it is not (currently) under the control of any white-listed CID

Read 1: Resource x is CID-allocated, meaning that it is (currently) under the control of one white-listed CID

If resource x is in secure state (SECx=1 in FMC_SECCFGR), this bit can be written only by a secure agent.

If resource x is in privileged state (FMC_PRIVCFGR.PRIVx=1), this bit can be written only by a privileged agent.

If resource x is CID-filtered (CFEN=1 in FMC_CIDCFGRx) and in semaphore mode (FMC_CIDCFGR.SEMEN=1), this bit can be written either by an authorized (white-listed) CID agent to acquire the control or by the same (white-listed) CID agent to release the control.

32.10 NOR flash/PSRAM controller

Caution: The FMC/NOR non-muxed mode is not supported on the STM32MP21xx devices. The muxed mode is enabled by default. The ASYNCWAIT and MUXEN bits of the FMC_BCRx registers, which are not applicable in muxed mode, must be left at their default value.

The FMC generates the appropriate signal timings to drive the following types of memories:

The FMC outputs a unique Chip Select signal, NE[4:1], per memory region. All the other signals (addresses, data and control) are shared.

The FMC supports a wide range of devices through a programmable timings among which:

The FMC output Clock (FMC_CLK) is a submultiple of the fmc_ker_ck clock. It can be delivered to the selected external device either during synchronous accesses only or during asynchronous and synchronous accesses depending on the CCKEN bit configuration in the FMC_BCR1 register:

The size of each memory region is fixed and equal to 64 Mbytes. Each memory region is configured through dedicated registers (see Section 32.10.6: NOR/PSRAM controller registers).

The programmable memory parameters include access times (see Table 227) and support for wait management (for PSRAM and NOR flash accessed in burst mode).

Table 227. Programmable NOR/PSRAM access parameters
ParameterFunctionAccess modeUnitMin.Max.
Address setupDuration of the address setup phaseAsynchronousFMC clock cycle (fmc_ker_ck)015
Address holdDuration of the address hold phaseAsynchronous, muxed I/OsFMC clock cycle (fmc_ker_ck)115
NBL setupDuration of the Byte lanes setup phaseAsynchronousFMC clock cycle (fmc_ker_ck)03
Data setupDuration of the data setup phaseAsynchronousFMC clock cycle (fmc_ker_ck)1256
Data holdDuration of the data hold phaseAsynchronousFMC clock cycle (fmc_ker_ck)03
Bust turnDuration of the bus turnaround phaseAsynchronous and synchronous readFMC clock cycle (fmc_ker_ck)015
Clock divide ratioNumber of FMC clock cycles (fmc_ker_ck) to build one memory clock cycle (CLK)SynchronousFMC clock cycle (fmc_ker_ck)216
Data latencyNumber of clock cycles to issue to the memory before the first data of the burstSynchronousMemory clock cycle (fmc_ker_ck)217

32.10.1 External memory interface signals

Table 228, Table 229 and Table 230 list the signals that are typically used to interface with NOR flash memory, SRAM and PSRAM.

Note: The prefix “N” identifies the signals which are active low.

NOR flash memory, non-multiplexed I/Os

Table 228. Non-multiplexed I/O NOR flash memory
FMC signal nameI/OFunction
CLKOClock (for synchronous access)
A[25:0]OAddress bus
D[15:0]I/OBidirectional data bus
NE[x]OChip Select, x = 1 to 4
NOEOOutput enable
NWEOWrite enable
NL(=NADV)OLatch enable (this signal is called address valid, NADV, by some NOR flash devices)
NWAITINOR flash wait input signal to the FMC

The maximum capacity is 512 Mbits (26 address lines).

NOR flash memory, 16-bit multiplexed I/Os

Table 229. 16-bit multiplexed I/O NOR flash memory
FMC signal nameI/OFunction
CLKOClock (for synchronous access)
A[25:16]OAddress bus
AD[15:0]I/O16-bit multiplexed, bidirectional address/data bus (the 16-bit address A[15:0] and data D[15:0] are multiplexed on the databus)
NE[x]OChip Select, x = 1 to 4
NOEOOutput enable
NWEOWrite enable
NL(=NADV)OLatch enable (this signal is called address valid, NADV, by some NOR flash devices)
NWAITINOR flash wait input signal to the FMC

The maximum capacity is 512 Mbits.

PSRAM/SRAM/FRAM, non-multiplexed I/Os

Table 230. Non-multiplexed I/Os PSRAM/SRAM
FMC signal nameI/OFunction
CLKOClock (only for PSRAM synchronous access)
A[25:0]OAddress bus
D[15:0]I/OData bidirectional bus
NE[x]OChip Select, x = 1 to 4 (called NCE by PSRAM (CellularRAM™, CRAM))
NOEOOutput enable
NWEOWrite enable
NL(= NADV)OAddress valid only for PSRAM input (memory signal name: NADV)
NWAITIPSRAM wait input signal to the FMC
NBL[1:0]OByte lane output (upper and lower byte enable)

The maximum capacity is 512 Mbits.

PSRAM, 16-bit multiplexed I/Os

Table 231. 16-bit multiplexed I/O PSRAM
FMC signal nameI/OFunction
CLKOClock (for synchronous access)
A[25:16]OAddress bus
Table 231. 16-bit multiplexed I/O PSRAM (continued)
FMC signal nameI/OFunction
AD[15:0]I/O16-bit multiplexed, bidirectional address/data bus (the 16-bit address A[15:0] and data D[15:0] are multiplexed on the databus)
NE[x]OChip Select, x = 1 to 4 (called NCE by PSRAM (CellularRAM™, CRAM))
NOEOOutput enable
NWEOWrite enable
NL(= NADV)OAddress valid PSRAM input (memory signal name: NADV)
NWAITIPSRAM wait input signal to the FMC
NBL[1:0]OByte lane output (upper and lower byte enable)

The maximum capacity is 512 Mbits (26 address lines).

32.10.2 Supported memories and transactions

Table 232 below shows an example of the supported devices, access modes and transactions when the memory data bus is 16-bit wide for NOR flash memory, PSRAM and SRAM. The transactions not allowed (or not supported) by the FMC are shown in gray in this example.

Table 232. NOR flash/PSRAM: Example of supported memories and transactions
DeviceModeR/WAXI data sizeMemory data sizeAllowed/ not allowedComments
NOR flash (muxed I/Os and non-muxed I/Os)AsynchronousR816Y-
AsynchronousW816N-
AsynchronousR1616Y-
AsynchronousW1616Y-
AsynchronousR3216YSplit into 2 FMC accesses
AsynchronousW3216YSplit into 2 FMC accesses
AsynchronousR6416YSplit into 4 FMC accesses
AsynchronousW6416YSplit into 4 FMC accesses
Asynchronous pageR-16NMode is not supported
SynchronousR816N-
SynchronousR1616Y-
SynchronousR3216Y-
SynchronousR6416YSplit into 4 FMC accesses

Table 232. NOR flash/PSRAM: Example of supported memories and transactions

DeviceModeR/WAXI data sizeMemory data sizeAllowed/ not allowedComments
PSRAM
(multiplexed I/Os and non-multiplexed I/Os)
AsynchronousR816Y-
AsynchronousW816YUse of byte lanes NBL[1:0]
AsynchronousR1616Y-
AsynchronousW1616Y-
AsynchronousR3216YSplit into 2 FMC accesses
AsynchronousW3216YSplit into 2 FMC accesses
AsynchronousR6416YSplit into 4 FMC accesses
AsynchronousW6416YSplit into 4 FMC accesses
Asynchronous pageR-16NMode is not supported
SynchronousR816N-
SynchronousR1616Y-
SynchronousR32/6416Y-
SynchronousW816YUse of byte lanes NBL[1:0]
SynchronousW16/32/6416Y-
SynchronousW6416Y-
SRAM and ROMAsynchronousR8 / 1616Y-
AsynchronousW8 / 1616YUse of byte lanes NBL[1:0]
AsynchronousR3216YSplit into 2 FMC accesses
AsynchronousW3216YSplit into 2 FMC accesses
AsynchronousR6416YSplit into 4 FMC accesses
AsynchronousW6416YSplit into 4 FMC accesses

32.10.3 General timing rules

Signals synchronization

32.10.4 NOR flash/PSRAM controller asynchronous transactions

Asynchronous static memories (NOR flash, PSRAM, SRAM, FRAM)

Mode 1 - SRAM/FRAM/PSRAM (CRAM)

The next figures show the read and write transactions for the supported modes followed by the required configuration of FMC_BCRx, and FMC_BTRx/FMC_BWTRx registers.

Figure 173. Mode 1 read access waveforms

Timing diagram for Mode 1 read access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus over time.

The diagram illustrates the timing for a Mode 1 read access. A horizontal double-headed arrow at the top labeled 'Memory transaction' spans from the first NBL[x:0] transition to the last. The signals shown are:

The label 'MSv45371V1' is at the bottom right.

Timing diagram for Mode 1 read access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus over time.

Figure 174. Mode 1 write access waveforms

Timing diagram for Mode 1 write access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus over time.

The diagram illustrates the timing for a Mode 1 write access. A horizontal double-headed arrow at the top labeled 'Memory transaction' spans from the first NBL[x:0] transition to the last. The signals shown are:

The label 'MSv45372V1' is at the bottom right.

Timing diagram for Mode 1 write access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus over time.

The DATAHLD time at the end of the read and write transaction guarantee the address and data hold time after the NOE/NWE rising edge. For write, the DATAST value must be greater than zero (DATAST > 0).

Table 233. FMC_BCRx bitfields (mode 1)
Bit numberBit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRW0x0 (no effect in asynchronous mode)
18:16CPSIZE0x0 (no effect in asynchronous mode)
15ASYNCWAITSet if the memory supports this feature. Otherwise keep cleared.
14EXTMOD0x0
13WAITEN0x0 (no effect in asynchronous mode)
12WRENAs needed
11WAITCFGDon't care
10Reserved0x0
9WAITPOLMeaningful only if bit 15 is 1
8BURSTEN0x0
7Reserved0x1
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYPAs needed, exclude 0x2 (NOR flash memory)
1MUXE0x0
0MBKEN0x1
Table 234. FMC_BTRx bitfields (mode 1)
Bit numberBit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD fmc_ker_ck cycles) for read accesses.
29-28ACCMODDon't care
27-24DATLATDon't care
23-20CLKDIVDon't care
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles).

Table 234. FMC_BTRx bitfields (mode 1) (continued)

Bit numberBit nameValue to set
7-4ADDHLDDon't care
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles). Minimum value for ADDSET is 0.

Mode A - SRAM/FRAM/PSRAM (CRAM) OE toggling

Figure 175. Mode A read access waveforms

Timing diagram for Mode A read access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus with timing parameters like NBLSET, ADDSET, DATAST, and DATAHLD.

The diagram illustrates the timing for a Mode A read access. It shows the following signals and their transitions:

Timing parameters are defined at the bottom:

The entire sequence is labeled as a Memory transaction. The diagram is labeled MSv45373V1.

Timing diagram for Mode A read access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus with timing parameters like NBLSET, ADDSET, DATAST, and DATAHLD.
Figure 176. Mode A write access waveforms Timing diagram for Mode A write access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus over time. The diagram is divided into phases: NBLSET (fmc_ker_ck cycles), ADDSET (fmc_ker_ck cycles), DATAST (fmc_ker_ck cycles), and DATAHLD +1 (fmc_ker_ck cycles). Overall period is labeled 'Memory transaction'. Data bus indicates 'Data driven by controller'.

MSv45372V1

Timing diagram for Mode A write access waveforms showing signals A[25:0], NBL[x:0], NEx, NOE, NWE, and Data bus over time. The diagram is divided into phases: NBLSET (fmc_ker_ck cycles), ADDSET (fmc_ker_ck cycles), DATAST (fmc_ker_ck cycles), and DATAHLD +1 (fmc_ker_ck cycles). Overall period is labeled 'Memory transaction'. Data bus indicates 'Data driven by controller'.

The differences compared with mode 1 are the toggling of NOE and the independent read and write timings.

Table 235. FMC_BCRx bitfields (mode A)
Bit numberBit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRW0x0 (no effect in asynchronous mode)
18:16CPSIZE0x0 (no effect in asynchronous mode)
15ASYNCWAITSet if the memory supports this feature. Otherwise keep cleared.
14EXTMOD0x1
13WAITEN0x0 (no effect in asynchronous mode)
12WRENAs needed
11WAITCFGDon’t care
10Reserved0x0
9WAITPOLMeaningful only if bit 15 is 1
8BURSTEN0x0

Table 235. FMC_BCRx bitfields (mode A) (continued)

Bit numberBit nameValue to set
7Reserved0x1
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYPAs needed, exclude 0x2 (NOR flash memory)
1MUXEN0x0
0MBKEN0x1

Table 236. FMC_BTRx bitfields (mode A)

Bit numberBit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD fmc_ker_ck cycles for read accesses).
29-28ACCMOD0x0
27-24DATLATDon't care
23-20CLKDIVDon't care
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles) for read accesses.
7-4ADDHLDDon't care
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles) for read accesses.
Minimum value for ADDSET is 0.

Table 237. FMC_BWTRx bitfields (mode A)

Bit numberBit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD+1 fmc_ker_ck cycles for write accesses).
29-28ACCMOD0x0
27:20Reserved0x0
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles) for write accesses.
7-4ADDHLDDon't care
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles) for write accesses.
Minimum value for ADDSET is 0.

Mode 2/B - NOR flash

Figure 177. Mode 2 and mode B read access waveforms

Timing diagram for Mode 2 and mode B read access waveforms.

This timing diagram illustrates the read access waveforms for Mode 2 and Mode B. The signals shown are A[25:0] (Address bus), NADV (Non-Address strobe), NEx (Non-Execute), NOE (Non-Output Enable), NWE (Non-Write Enable), and Data bus. The NWE signal is held high throughout the transaction. The address bus A[25:0] is valid during the ADDSET phase. The data bus is driven by memory during the DATAST and DATAHLD phases. The transaction is divided into three cycles: ADDSET (fmc_ker_ck cycles), DATAST (fmc_ker_ck cycles), and DATAHLD (fmc_ker_ck cycles). The NADV signal is active low during the DATAST and DATAHLD phases. The NEx signal is active low during the ADDSET and DATAST phases. The NOE signal is active low during the DATAST and DATAHLD phases.

MSv45374V1

Timing diagram for Mode 2 and mode B read access waveforms.

Figure 178. Mode 2 write access waveforms

Timing diagram for Mode 2 write access waveforms.

This timing diagram illustrates the write access waveforms for Mode 2. The signals shown are A[25:0] (Address bus), NADV (Non-Address strobe), NEx (Non-Execute), NOE (Non-Output Enable), NWE (Non-Write Enable), and Data bus. The NWE signal is active low during the DATAST phase. The address bus A[25:0] is valid during the ADDSET phase. The data bus is driven by the controller during the DATAST and DATAHLD phases. The transaction is divided into three cycles: ADDSET (fmc_ker_ck cycles), DATAST (fmc_ker_ck cycles), and DATAHLD (+1 fmc_ker_ck cycles). The NADV signal is active low during the DATAST and DATAHLD phases. The NEx signal is active low during the ADDSET and DATAST phases. The NOE signal is active low during the DATAST and DATAHLD phases.

MSv45375V1

Timing diagram for Mode 2 write access waveforms.

Figure 179. Mode B write access waveforms

Timing diagram for Mode B write access waveforms showing signals A[25:0], NADV, NEx, NOE, NWE, and Data bus over time. It includes timing parameters like ADDSET, DATAST, and DATAHLD.

The diagram illustrates the timing for a Mode B write access. A horizontal arrow at the top labeled 'Memory transaction' spans from the first address setup to the last data hold. The signals shown are:

Timing parameters are defined below the data bus:

MSv45376V1

Timing diagram for Mode B write access waveforms showing signals A[25:0], NADV, NEx, NOE, NWE, and Data bus over time. It includes timing parameters like ADDSET, DATAST, and DATAHLD.

The differences with mode 1 are the toggling of NWE and the independent read and write timings when extended mode is set (mode B).

Table 238. FMC_BCRx bitfields (mode 2/B)

Bit numberBit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRW0x0 (no effect in asynchronous mode)
18:16CPSIZE0x0 (no effect in asynchronous mode)
15ASYNCWAITSet if the memory supports this feature. Otherwise keep cleared.
14EXTMOD0x1 for mode B, 0x0 for mode 2
13WAITEN0x0 (no effect in asynchronous mode)
12WRENAs needed
11WAITCFGDon't care
10Reserved0x0
9WAITPOLMeaningful only if bit 15 is 1
8BURSTEN0x0
Table 238. FMC_BCRx bitfields (mode 2/B) (continued)
Bit numberBit nameValue to set
7Reserved0x1
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYP0x2 (NOR flash memory)
1MUXEN0x0
0MBKEN0x1
Table 239. FMC_BTRx bitfields (mode 2/B)
Bit numberBit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD fmc_ker_ck cycles for read accesses).
29-28ACCMOD0x1 if extended mode is set
27-24DATLATDon't care
23-20CLKDIVDon't care
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the access second phase (DATAST fmc_ker_ck cycles) for read accesses.
7-4ADDHLDDon't care
3-0ADDSETDuration of the access first phase (ADDSET fmc_ker_ck cycles) for read accesses. Minimum value for ADDSET is 0.
Table 240. FMC_BWTRx bitfields (mode 2/B)
Bit numberBit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD+1 fmc_ker_ck cycles for write accesses).
29-28ACCMOD0x1 if extended mode is set
27:20Reserved0x0
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the access second phase (DATAST fmc_ker_ck cycles) for write accesses.
7-4ADDHLDDon't care
3-0ADDSETDuration of the access first phase (ADDSET fmc_ker_ck cycles) for write accesses. Minimum value for ADDSET is 0.

Note: The FMC_BWTRx register is valid only if the extended mode is set (mode B), otherwise its content is don't care.

Mode C - NOR flash - OE toggling

Figure 180. Mode C read access waveforms

Timing diagram for Mode C read access waveforms showing signals A[25:0], NADV, NEx, NOE, NWE, and Data bus over time. It includes timing parameters like ADDSET, DATAST, and DATAHLD.

The diagram illustrates the timing for a Mode C read access. A horizontal double-headed arrow at the top labeled 'Memory transaction' spans from the first address setup to the last data hold. The signals shown are:

Timing parameters at the bottom are:The reference code MSv45377V1 is located at the bottom right.

Timing diagram for Mode C read access waveforms showing signals A[25:0], NADV, NEx, NOE, NWE, and Data bus over time. It includes timing parameters like ADDSET, DATAST, and DATAHLD.

Figure 181. Mode C write access waveforms

Timing diagram for Mode C write access waveforms showing signals A[25:0], NADV, NEx, NOE, NWE, and Data bus over time. It includes timing parameters like ADDSET, DATAST, and DATAHLD +1.

The diagram illustrates the timing for a Mode C write access. A horizontal double-headed arrow at the top labeled 'Memory transaction' spans from the first address setup to the last data hold. The signals shown are:

Timing parameters at the bottom are:The reference code MSv45375V1 is located at the bottom right.

Timing diagram for Mode C write access waveforms showing signals A[25:0], NADV, NEx, NOE, NWE, and Data bus over time. It includes timing parameters like ADDSET, DATAST, and DATAHLD +1.

The differences compared with mode 1 are the toggling of NOE and the independent read and write timings.

Table 241. FMC_BCRx bitfields (mode C)
Bit No.Bit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRW0x0 (no effect in asynchronous mode)
18:16CPSIZE0x0 (no effect in asynchronous mode)
15ASYNCWAITSet if the memory supports this feature. Otherwise keep cleared.
14EXTMOD0x1
13WAITEN0x0 (no effect in asynchronous mode)
12WRENAs needed
11WAITCFGDon't care
10Reserved0x0
9WAITPOLMeaningful only if bit 15 is 1
8BURSTEN0x0
7Reserved0x1
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYP[1:0]0x02 (NOR flash memory)
1MUXEN0x0
0MBKEN0x1
Table 242. FMC_BTRx bitfields (mode C)
Bit No.Bit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD fmc_ker_ck cycles for read accesses).
29-28ACCMOD0x2
27-24DATLAT0x0
23-20CLKDIV0x0
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles) for read accesses.
7-4ADDHLDDon't care
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles) for read accesses. Minimum value for ADDSET is 0.
Table 243. FMC_BWTRx bitfields (mode C)
Bit No.Bit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD+1 fmc_ker_ck cycles for write accesses).
29-28ACCMOD0x2
27:20Reserved0x0
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles) for write accesses.
7-4ADDHLDDon't care
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles) for write accesses. Minimum value for ADDSET is 0.

Mode D - asynchronous access with extended address

Figure 182. Mode D read access waveforms Timing diagram for Mode D read access waveforms showing signals A[25:0], NADV, NBL[x:0], NEx, NOE, NWE, and Data bus over time. The diagram illustrates the sequence of events for a memory transaction, including address setup, data bus enable, and data hold phases.

The diagram illustrates the timing for a Mode D read access. It shows the following signals and their relationships:

The memory transaction is defined by the duration of the address valid signal (NADV) and the chip enable signal (NEx). The data bus is high-impedance during the memory transaction and driven by memory during the data hold phase. The timing parameters shown are:

MSv45378V1

Timing diagram for Mode D read access waveforms showing signals A[25:0], NADV, NBL[x:0], NEx, NOE, NWE, and Data bus over time. The diagram illustrates the sequence of events for a memory transaction, including address setup, data bus enable, and data hold phases.

Figure 183. Mode D write access waveforms

Timing diagram for Mode D write access waveforms showing signals A[25:0], NADV, NBL[x:0], NEx, NOE, NWE, and Data bus over time. The diagram is divided into five phases: NBLSET, ADDSET, ADDHLD, DATAST, and DATAHLD. A 'Memory transaction' bar spans from the start of NBLSET to the end of DATAHLD. The Data bus is labeled 'Data driven by controller' during the DATAST and DATAHLD phases.

The diagram illustrates the timing relationships for a Mode D write access. It shows the following signals and their transitions:

The timing phases are defined as follows:

MSv45379V1

Timing diagram for Mode D write access waveforms showing signals A[25:0], NADV, NBL[x:0], NEx, NOE, NWE, and Data bus over time. The diagram is divided into five phases: NBLSET, ADDSET, ADDHLD, DATAST, and DATAHLD. A 'Memory transaction' bar spans from the start of NBLSET to the end of DATAHLD. The Data bus is labeled 'Data driven by controller' during the DATAST and DATAHLD phases.

The differences with mode 1 are the toggling of NOE that goes on toggling after NADV changes and the independent read and write timings.

Table 244. FMC_BCRx bitfields (mode D)

Bit No.Bit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRW0x0 (no effect in asynchronous mode)
18:16CPSIZE0x0 (no effect in asynchronous mode)
15ASYNCWAITSet if the memory supports this feature. Otherwise keep cleared.
The ASYNCWAIT feature is not supported in mode D mode.
14EXTMOD0x1
13WAITEN0x0 (no effect in asynchronous mode)
12WRENAs needed
11WAITCFGDon't care
10Reserved0x0
9WAITPOLMeaningful only if bit 15 is 1
Table 244. FMC_BCRx bitfields (mode D) (continued)
Bit No.Bit nameValue to set
8BURSTEN0x0
7Reserved0x1
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYP[1:0]As needed
1MUXEN0x0
0MBKEN0x1
Table 245. FMC_BTRx bitfields (mode D)
Bit No.Bit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD fmc_ker_ck cycles for read accesses).
29-28ACCMOD0x3
27-24DATLATDon't care
23-20CLKDIVDon't care
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles) for read accesses.
7-4ADDHLDDuration of the middle phase of the read access (ADDHLD fmc_ker_ck cycles)
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles) for read accesses. Minimum value for ADDSET is 1.
Table 246. FMC_BWTRx bitfields (mode D)
Bit No.Bit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD+1 fmc_ker_ck cycles for write accesses).
29-28ACCMOD0x3
27:20Reserved0x0
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST + 1 fmc_ker_ck cycles) for write accesses.
7-4ADDHLDDuration of the middle phase of the write access (ADDHLD fmc_ker_ck cycles)
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles) for write accesses. Minimum value for ADDSET is 1.

Muxed mode - multiplexed asynchronous access to NOR flash memory

Figure 184. Muxed read access waveforms

Timing diagram for muxed read access waveforms showing signals A[25:16], NADV, NBL[x:0], NEx, NOE, NWE, and A/D[15:0] over time. It includes timing parameters like NBLSET, ADDSET, ADDHLD, DATAST, and DATAHLD in fmc_ker_ck cycles.

The diagram illustrates the timing for a muxed read access to NOR flash memory. It shows the following signals and their transitions:

Timing parameters are defined relative to the fmc_ker_ck clock:

The total duration of the transaction is labeled as Memory transaction. The diagram is labeled MSv45380V1 in the bottom right corner.

Timing diagram for muxed read access waveforms showing signals A[25:16], NADV, NBL[x:0], NEx, NOE, NWE, and A/D[15:0] over time. It includes timing parameters like NBLSET, ADDSET, ADDHLD, DATAST, and DATAHLD in fmc_ker_ck cycles.

Figure 185. Muxed write access waveforms

Timing diagram for Muxed write access waveforms showing signals A[25:16], NADV, NBL[x:0], NEx, NOE, NWE, and A/D[15:0] over a memory transaction. The diagram shows the sequence of events: NBLSET, ADDSET, ADDHLD, DATAST, and DATAHLD, with timing relative to the fmc_ker_ck cycles.

The diagram illustrates the timing of a muxed write access transaction. It shows the following signals and their transitions:

The transaction is divided into several phases based on the fmc_ker_ck cycles:

MSv45381V1

Timing diagram for Muxed write access waveforms showing signals A[25:16], NADV, NBL[x:0], NEx, NOE, NWE, and A/D[15:0] over a memory transaction. The diagram shows the sequence of events: NBLSET, ADDSET, ADDHLD, DATAST, and DATAHLD, with timing relative to the fmc_ker_ck cycles.

The difference with mode D is the drive of the lower address byte(s) on the data bus.

Table 247. FMC_BCRx bitfields (muxed mode)

Bit No.Bit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRW0x0 (no effect in asynchronous mode)
18:16CPSIZE0x0 (no effect in asynchronous mode)
15ASYNCWAITSet if the memory supports this feature. Otherwise keep cleared.
The ASYNCWAIT feature is not supported in muxed mode.
14EXTMOD0x0
13WAITEN0x0 (no effect in asynchronous mode)
12WRENAs needed
11WAITCFGDon't care
10Reserved0x0
9WAITPOLMeaningful only if bit 15 is 1
Table 247. FMC_BCRx bitfields (muxed mode) (continued)
Bit No.Bit nameValue to set
8BURSTEN0x0
7Reserved0x1
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYP[1:0]0x2 (NOR flash memory)
1MUXEN0x1
0MBKEN0x1
Table 248. FMC_BTRx bitfields (muxed mode)
Bit No.Bit nameValue to set
31:30DATAHLDDuration of the Data hold phase (DATAHLD fmc_ker_ck cycles for read accesses, DATAHLD+1 fmc_ker_ck cycles for write accesses).
29-28ACCMOD0x0
27-24DATLATDon't care
23-20CLKDIVDon't care
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDuration of the second access phase (DATAST fmc_ker_ck cycles for read accesses and DATAST+1 fmc_ker_ck cycles for write accesses).
7-4ADDHLDDuration of the middle phase of the access (ADDHLD fmc_ker_ck cycles).
3-0ADDSETDuration of the first access phase (ADDSET fmc_ker_ck cycles). Minimum value for ADDSET is 1.

WAIT management for asynchronous accesses

If the asynchronous memory asserts the WAIT signal to indicate that it is not yet ready to accept or to provide data, the ASYNCWAIT bit has to be set in FMC_BCRx register.

If the WAIT signal is active (high or low depending on the WAITPOL bit), the second access phase (Data setup phase), programmed by the DATAST bits, is extended until WAIT becomes inactive. Unlike the data setup phase, the first access phases (Address setup and Address hold phases), programmed by the ADDSET and ADDHLD bits, are not WAIT sensitive and so they are not prolonged.

The data setup phase must be programmed so that WAIT can be detected 4 fmc_ker_ck cycles before the end of the memory transaction. The following cases must be considered:

  1. 1. The memory asserts the WAIT signal aligned to NOE/NWE which toggles:

\[DATAST \geq (4 \times FMCCLK) + max\_wait\_assertion\_time\]

  1. 2. The memory asserts the WAIT signal aligned to NEx (or NOE/NWE not toggling):
    if

\[max\_wait\_assertion\_time > address\_phase + hold\_phase\]

then:

\[DATAST \geq (4 \times FMCCLK) + (max\_wait\_assertion\_time - address\_phase - hold\_phase)\]

otherwise

\[DATAST \geq 4 \times FMCCLK\]

where max_wait_assertion_time is the maximum time taken by the memory to assert the WAIT signal once NEx/NOE/NWE is low.

Figure 186 and Figure 187 show the number of fmc_ker_ck clock cycles that are added to the memory access phase after WAIT is released by the asynchronous memory (independently of the above cases).

Figure 186. Asynchronous wait during a read access waveforms

Figure 186: Asynchronous wait during a read access waveforms. Shows Memory transaction divided into address phase and data setup phase. Signals: A[25:0], NEx, NWAIT (showing don't care regions and active wait pulse), NOE (active low during data phase), and Data bus driven by memory for 4 fmc_ker_ck.

MSv40382V2

Figure 186: Asynchronous wait during a read access waveforms. Shows Memory transaction divided into address phase and data setup phase. Signals: A[25:0], NEx, NWAIT (showing don't care regions and active wait pulse), NOE (active low during data phase), and Data bus driven by memory for 4 fmc_ker_ck.

Figure 187. Asynchronous wait during a write access waveforms

Figure 187: Asynchronous wait during a write access waveforms. Shows Memory transaction divided into address phase and data setup phase. Signals: A[25:0], NEx, NWAIT (showing don't care regions and wait pulse), NWE, and Data bus driven by FMC. Timing shows 1 fmc_ker_ck after NWE goes high and 3 fmc_ker_ck for bus hold/extension.

MSv40383V3

Figure 187: Asynchronous wait during a write access waveforms. Shows Memory transaction divided into address phase and data setup phase. Signals: A[25:0], NEx, NWAIT (showing don't care regions and wait pulse), NWE, and Data bus driven by FMC. Timing shows 1 fmc_ker_ck after NWE goes high and 3 fmc_ker_ck for bus hold/extension.

CellularRAM™ (PSRAM) refresh management

The CellularRAM™ does not allow maintaining the chip select signal (NE) low for longer than the \(t_{CEM}\) timing specified in memory device. This timing can be programmed in the FMC_CFGR register. It defines the maximum duration of the NE low pulse (expressed in fmc_ker_ck cycles) in synchronous mode for PSRAM read or write accesses.

32.10.5 Synchronous transactions

The memory clock, FMC_CLK, is a submultiple of fmc_ker_ck. It depends on the value of CLKDIV.

NOR flash memories specify a minimum time from NADV assertion to FMC_CLK high. To meet this constraint, the FMC does not issue the clock to the memory during the first internal clock cycle of the synchronous access (before NADV assertion). This guarantees that the rising edge of the memory clock occurs in the middle of the NADV low pulse.

Data latency versus NOR memory latency

The data latency is the number of cycles to wait before sampling the data. The DATLAT value must be consistent with the latency value specified in the NOR flash configuration register. The FMC does not include the clock cycle when NADV is low in the data latency count.

Caution: Some NOR flash memories include the NADV Low cycle in the data latency count, so that the exact relation between the NOR flash latency and the FMC DATLAT parameter can be either:

Some recent memories assert NWAIT during the latency phase. In such cases DATLAT can be set to its minimum value. As a result, the FMC samples the data and waits long enough to evaluate if the data are valid. Thus the FMC detects when the memory exits latency and real data are processed.

Other memories do not assert NWAIT during latency. In this case the latency must be set correctly for both the FMC and the memory, otherwise invalid data are mistaken for good data, or valid data are lost in the initial phase of the memory access.

Single-burst transfer

When the selected memory region is configured in burst mode for synchronous accesses, if for example a single-burst transaction is requested on 16-bit memories, the FMC performs a burst transaction of length 1 (if the AXI transfer is 16 bits), or length 2 (if the AXI transfer is 32 bits) and deassert the Chip Select signal when the last data is strobed.

Such transfers are not the most efficient in terms of cycles compared to asynchronous read operations. Nevertheless, a random asynchronous access first requires to re-program the memory access mode, which altogether lasts longer.

Cross boundary page for CellularRAM™ 1.5

CellularRAM™ 1.5 does not allow burst access to cross the page boundary. The FMC allows to split automatically the burst access when the memory page size is reached by configuring the CPSIZE bits in the FMC_BCR1 register following the memory page size.

Wait management

For synchronous NOR flash memories, NWAIT is evaluated after the programmed latency period, which corresponds to (DATLAT+2) FMC_CLK clock cycles.

If NWAIT is active (low level when WAITPOL = 0, high level when WAITPOL = 1), wait-states are inserted until NWAIT is inactive (high level when WAITPOL = 0, low level when WAITPOL = 1).

When NWAIT is inactive, the data is considered valid either immediately (bit WAITCFG = 1) or on the next clock edge (bit WAITCFG = 0).

During wait-state insertion via the NWAIT signal, the controller continues to send clock pulses to the memory, keeping the Chip Select and output enable signals valid. It does not consider the data as valid.

In burst mode, there are two timing configurations for the NOR flash NWAIT signal:

The FMC supports both NOR flash wait-state configurations, for each Chip Select, thanks to the WAITCFG bit in the FMC_BCRx registers (x = 0 to 3).

Figure 188. Wait configuration waveforms

Timing diagram showing wait configuration waveforms for FMC_CLK, A[25:16], NADV, NWAIT (WAITCFG = 0), NWAIT (WAITCFG = 1), and A/D[15:0]. It illustrates the insertion of wait states and data strobes.

The diagram illustrates the timing of various signals during a memory access. The signals shown are:

Vertical dashed lines indicate clock edges. The diagram shows an "inserted wait state" between data transfers. "Data strobes" are indicated by arrows pointing to the data bus during valid data periods.

MSv40384V4

Timing diagram showing wait configuration waveforms for FMC_CLK, A[25:16], NADV, NWAIT (WAITCFG = 0), NWAIT (WAITCFG = 1), and A/D[15:0]. It illustrates the insertion of wait states and data strobes.

Flexible memory controller (FMC)

RM0506

Figure 189. Synchronous multiplexed read mode waveforms - NOR, PSRAM (CRAM)

Synchronous multiplexed read mode waveforms - NOR, PSRAM (CRAM)

Waveform diagram illustrating the synchronous multiplexed read mode for FMC. Signals include FMC_CLK, A[25:16], NEx, NOE, NWE (High), NADV, NWAIT (WAITCFG=0), and A/D[15:0]. Address phase shows addr[25:16] and Addr[15:0] during the first 1 clock cycle. NWAIT shows an inserted wait state during continuous data bursts (data, data, data, data). Latency between address phase and first valid data is marked as (DATLAT + 2) FMC_CLK cycles. Sampling points are indicated by Data strobes arrows on FMC_CLK rising edges.

Synchronous multiplexed read mode waveforms - NOR, PSRAM (CRAM)

MSv40385V4

Table 249. FMC_BCRx bitfields (Synchronous multiplexed read mode)
Bit No.Bit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRWAs needed
18:16CPSIZEAs needed. (0x1 when using CRAM 1.5)
15ASYNCWAIT0x0
14EXTMOD0x0
13WAITENto be set if the memory supports this feature, to be kept cleared otherwise
12WRENno effect on synchronous read
11WAITCFGto be set according to memory
10Reserved0x0
9WAITPOLto be set according to memory
8BURSTEN0x1
7Reserved0x1
6Reserved0x0

1666/4831

RM0506 Rev 2

ST logo
ST logo
Table 249. FMC_BCRx bitfields (Synchronous multiplexed read mode) (continued)
Bit No.Bit nameValue to set
5-4MWID[1:0]As needed
3-2MTYP[1:0]0x1 or 0x2
1MUXENAs needed
0MBKEN0x1
Table 250. FMC_BTRx bitfields (Synchronous multiplexed read mode)
Bit No.Bit nameValue to set
31:30DATAHLDDon't care
29:28ACCMOD0x0
27-24DATLATData latency
27-24DATLATData latency
23-20CLKDIVFMC_CLK divider ratio
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDon't care
7-4ADDHLDDon't care
3-0ADDSETDon't care

Figure 190. Synchronous multiplexed write mode waveforms - PSRAM (CRAM)

Figure 190. Synchronous multiplexed write mode waveforms - PSRAM (CRAM)

MSv40386V4

Figure 190. Synchronous multiplexed write mode waveforms - PSRAM (CRAM)
  1. 1. The memory must issue NWAIT signal one cycle in advance, accordingly WAITCFG must be programmed to 0.

Table 251. FMC_BCRx bitfields (Synchronous multiplexed write mode)

Bit No.Bit nameValue to set
31Reserved0x0
30-24Reserved0x000
23:22NBLSET[1:0]As needed
21:20CSCOUNTAs needed
19CBURSTRWAs needed
18:16CPSIZEAs needed. (0x1 when using CRAM 1.5)
15ASYNCWAIT0x0
14EXTMOD0x0
13WAITENto be set if the memory supports this feature, to be kept cleared otherwise.
12WREN0x1
11WAITCFG0x0
10Reserved0x0
9WAITPOLto be set according to memory
8BURSTEN0x1
7Reserved0x1
Table 251. FMC_BCRx bitfields (Synchronous multiplexed write mode) (continued)
Bit No.Bit nameValue to set
6Reserved0x0
5-4MWID[1:0]As needed
3-2MTYP[1:0]0x1
1MUXENAs needed
0MBKEN0x1
Table 252. FMC_BTRx bitfields (Synchronous multiplexed write mode)
Bit No.Bit nameValue to set
31:30DATAHLDDon't care
29:28ACCMOD0x0
27-24DATLATData latency
23-20CLKDIVFMC_CLK divider ratio
19-16BUSTURNTime between NEx high to NEx low (BUSTURN fmc_ker_ck)
15-8DATASTDon't care
7-4ADDHLDDon't care
3-0ADDSETDon't care

32.10.6 NOR/PSRAM controller registers

The peripheral registers have to be accessed by words (32-bit)

SRAM/NOR flash chip-select control register for memory region x (FMC_BCRx)

Address offset: 0x00+0x08*(x-1), (x = 1 to 4)

Reset value: 0x0000 30DB, 0x0000 30D2, 0x0000 30D2, 0x0000 30D2

This register contains the control information of each memory region, used for SRAMs, PSRAM, FRAM and NOR flash memories.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.NBLSET[1:0]CSCOUNT1CSCOUNT0CBURSTRWCPSIZE[2:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
ASYNCWAITEXTMODWAITENWRENWAITCFGRes.WAITPOLBURSTENRes.Res.MWID[1:0]MTYP[1:0]MUXENMBKEN
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 14 EXTMOD: Extended mode enable

This bit enables write timing programming for asynchronous accesses inside the FMC_BWTR register, thus resulting in different timings for read and write operations.

Note: When the extended mode is disabled, the FMC can operate in mode 1 or mode 2 as follows:

Bit 13 WAITEN: Wait enable bit

This bit enables/disables wait-state insertion via the NWAIT signal when accessing the memory in synchronous mode.

Bit 12 WREN: Write enable bit

This bit indicates whether write operations to the memory region by the FMC are enabled/disabled:

Bit 11 WAITCFG: Wait timing configuration

The NWAIT signal indicates whether the data from the memory are valid or if a wait-state must be inserted when accessing the memory in synchronous mode. This configuration bit determines if NWAIT is asserted by the memory one clock cycle before the wait-state or during the wait-state:

Bit 10 Reserved, must be kept at reset value.

Bit 9 WAITPOL: Wait signal polarity bit

This bit defines the polarity of the wait signal from memory used for either in synchronous or asynchronous mode:

Bit 8 BURSTEN: Burst enable bit

This bit enables/disables synchronous accesses during read operations. It is valid only for synchronous memories operating in burst mode:

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:4 MWID[1:0]: Memory data bus width

This bit defines the external memory device width, valid for all type of memories.

00: 8 bits

01: 16 bits (default after reset)

10: Reserved.

11: Reserved.

Bits 3:2 MTYP[1:0]: Memory type

This bit defines the type of external memory attached to the corresponding memory region:

00: SRAM/ FRAM (default after reset for memory region 2...4)

01: PSRAM (CRAM)/FRAM

10: NOR flash/OneNAND flash (default after reset for memory region 1)

11: Reserved.

Bit 1 MUXEN: Address/data multiplexing enable bit

When this bit is set, the address and data values are multiplexed on the data bus, valid only with NOR and PSRAM memories:

0: Address/Data non-multiplexed

1: Address/Data multiplexed on databus (default after reset)

Bit 0 MBKEN: Memory region enable bit

This bit enables the memory region. After reset memory region 1 is enabled, all others are disabled. Accessing a disabled memory region causes an ERROR on AXI bus.

0: Corresponding memory region is disabled

1: Corresponding memory region is enabled

SRAM/NOR flash chip-select timing registers for memory region x (FMC_BTRx)

Address offset: 0x04+0x8*(x-1), (x = 1 to 4)

Reset value: 0x0FFF FFFF

This register contains the control information of each memory region, used for SRAMs, PSRAM and NOR flash memories. If the EXTMOD bit is set in the FMC_BCRx register, then this register is partitioned for write and read access, that is, two registers are available: one to configure read accesses (this register) and one to configure write accesses (FMC_BWTRx registers).

31302928272625242322212019181716
DATAHLD[1:0]ACCMOD[1:0]DATLAT[3:0]CLKDIV[3:0]BUSTURN[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DATAST[7:0]ADDHLD[3:0]ADDSET[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 DATAHLD[1:0]: Data Hold phase duration

These bits are written by software to define the duration of the data hold phase in fmc_ker_ck cycles (refer to Figure 186 to Figure 187), used in asynchronous accesses:

For read/write accesses:

00: DATAHLD phase duration = fmc_ker_ck clock cycle * 0 (default, read)/1 (default, write)

01: DATAHLD phase duration = fmc_ker_ck clock cycle * 1 (read)/2 (write)

10: DATAHLD phase duration = fmc_ker_ck clock cycle * 2 (read)/3 (write)

11: DATAHLD phase duration = fmc_ker_ck clock cycle * 3 (read)/4 (write)

Bits 29:28 ACCMOD[1:0]: Access mode

These bits specify the asynchronous access modes as shown in the timing diagrams. These bits are taken into account only when the EXTMOD bit in the FMC_BCRx register is 1.

00: Access mode A

01: Access mode B

10: Access mode C

11: Access mode D

Bits 27:24 DATLAT[3:0]: Data latency for synchronous memory (see note below bit descriptions)

For synchronous access with read/write burst mode enabled (BURSTEN / CBURSTRW bits set), these bits define the number of memory clock cycles (+2) to issue to the memory before reading/writing the first data.

This timing parameter is not expressed in fmc_ker_ck periods, but in FMC_CLK periods.

For asynchronous access, this value is don't care.

0000: Data latency of 2 FMC_CLK clock cycles for first burst access

1111: Data latency of 17 FMC_CLK clock cycles for first burst access (default value after reset)

Bits 23:20 CLKDIV[3:0]: Clock divide ratio (for FMC_CLK signal)

These bits define FMC_CLK clock output signal period, expressed in fmc_ker_ck cycles:

0000: Reserved.

0001: FMC_CLK period = 2 × fmc_ker_ck periods

0010: FMC_CLK period = 3 × fmc_ker_ck periods

1111: FMC_CLK period = 16 × fmc_ker_ck periods (default value after reset)

This value is don't care when accessing NOR flash memories, SRAM and PSRAM in asynchronous mode.

Note: Refer to Section 32.10.5: Synchronous transactions for FMC_CLK divider ratio formula).

Note: CLKDIV[3:0] bits are don't care when CCLKEN bit of FMC_CFGR is set. In this case FMC_CLK clock output is controlled by CLKDIV of FMC_CFGR.

Bits 19:16 BUSTURN[3:0]: Bus turnaround phase duration

These bits are written by software to add a delay between the end of current read or write transaction and the next transaction on the same memory region.

This delay allows matching the minimum time between consecutive transactions (\(t_{EHEL}\) from NEx high to NEx low) and the maximum time required by the memory to free the data bus after a read access (\(t_{EHQZ}\) from chip enable high to output Hi-Z). This delay is recommended for mode D and muxed mode. For non-muxed memory, the bus turnaround delay can be set to a minimum value that respects the following condition:

\[(BUSTRUN + 1) fmc\_ker\_ck \text{ period} \geq t_{EHELmin} \max(t_{EHELmin}, t_{EHQZmax})\]

For FRAMs, the bus turnaround delay must be configured to match the minimum precharge time (\(t_{PC}\)). This delay is inserted between all consecutive transactions on the same memory region (read/read, write/write, read/write and write/read) to match the \(t_{PC}\) memory timing, and the Chip select toggles between consecutive accesses.

\[(BUSTRUN + 1) fmc\_ker\_ck \text{ period} \geq t_{PCmin}\]

0000: BUSTURN phase duration = 1 * fmc_ker_ck clock cycle added

...

1111: BUSTURN phase duration = 16 * fmc_ker_ck clock cycles added (default value after reset)

Bits 15:8 DATAST[7:0]: Data-phase duration

These bits are written by software to define the duration of the data phase (refer to Figure 186 to Figure 187) used in asynchronous accesses:

0000 0000: Reserved.

0000 0001: DATAST phase duration = 1*fmc_ker_ck clock cycles

0000 0010: DATAST phase duration = 2*fmc_ker_ck clock cycles

...

1111 1111: DATAST phase duration = 255*fmc_ker_ck clock cycles (default value after reset)

For each memory type and access mode data-phase duration, refer to the respective figure (Figure 186 to Figure 187).

Example of mode 1, write access, DATAST=1:

Data-phase duration= DATAST+1 = 2*fmc_ker_ck clock cycles.

Note: This value is don't care in synchronous accesses.

Bits 7:4 ADDHLD[3:0]: Address-hold phase duration

These bits are written by software to define the duration of the address hold phase (refer to Figure 182 to Figure 185) used in mode D or multiplexed accesses:

0000: Reserved.

0001: ADDHLD phase duration = 1*fmc_ker_ck clock cycle

0010: ADDHLD phase duration = 2*fmc_ker_ck clock cycle

...

1111: ADDHLD phase duration = 15*fmc_ker_ck clock cycles (default value after reset)

For each access mode address-hold phase duration, refer to the respective figure (Figure 182 to Figure 185).

Note: This value is not used in synchronous accesses, and the address hold phase lasts always 1 memory clock period.

Bits 3:0 ADDSET[3:0]: Address setup phase duration

These bits are written by software to define the duration of the address setup phase (refer to Figure 186 to Figure 187), used in SRAMs, ROMs and asynchronous NOR flash memories:

0000: ADDSET phase duration = 0*fmc_ker_ck clock cycle

...

1111: ADDSET phase duration = 15*fmc_ker_ck clock cycles (default value after reset)

For each access mode address setup phase duration, refer to the respective figure (refer to Figure 186 to Figure 187).

Note: This value is don't care in synchronous accesses.

In muxed mode or mode D, the minimum value for ADDSET is 1.

Note: PSRAMs (CRAMs) have a variable latency due to internal refresh. Therefore these memories issue the NWAIT signal during the whole latency phase to extend the latency as needed.

On PSRAMs (CRAMs), DATLAT must be configured to 0 so that the FMC quickly exits its latency phase, starts sampling NWAIT from memory, and starts read or write operations when the memory is ready.

This method can be used also with the latest generation of synchronous flash memories, which, unlike older flash memories, issue the NWAIT signal (check the corresponding flash memory datasheet).

SRAM/NOR-flash write timing registers for memory region x (FMC_BWTRx)

Address offset: 0x104+0x8*(x-1), (x = 1 to 4)

Reset value: 0x000F FFFF

This register contains the control information of each memory region. It is used for SRAMs, FRAMs, PSRAMs and NOR flash memories. When the EXTMOD bit is set in the FMC_BCRx register, then this register is active for write access.

31302928272625242322212019181716
DATAHLD[1:0]ACCMOD[1:0]Res.Res.Res.Res.Res.Res.Res.Res.BUSTURN[3:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
DATAST[7:0]ADDHLD[3:0]ADDSET[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 DATAHLD[1:0]: Data Hold phase duration

These bits are written by software to define the duration of the data hold phase in fmc_ker_ck cycles (refer to Figure 187), used in asynchronous write accesses:

Bits 29:28 ACCMOD[1:0]: Access mode.

These bits specify the asynchronous access modes as shown in the next timing diagrams. These bits are taken into account only when the EXTMOD bit in the FMC_BCRx register is 1.

Bits 27:20 Reserved, must be kept at reset value.

Bits 19:16 BUSTURN[3:0]: Bus turnaround phase duration

These bits are written by software to add a delay between the end of current write transaction and the next transaction on the same memory region.

For FRAMs, the bus turnaround delay must be configured to match the minimum precharge time (\(t_{PC}\)). The bus turnaround delay is inserted between all consecutive transactions on the same memory region (read/read, write/write, read/write and write/read), and the Chip select toggles between consecutive accesses.

(BUSTURN + 1) fmc_ker_ck period \(\geq t_{PCmin}\)

0000: BUSTURN phase duration = 1 * fmc_ker_ck clock cycle added

...

1111: BUSTURN phase duration = 16 * fmc_ker_ck clock cycles added (default value after reset)

Bits 15:8 DATAST[7:0]: Data-phase duration.

These bits are written by software to define the data phase duration (refer to Figure 186 to Figure 187) used in asynchronous SRAM, PSRAM and NOR flash memory accesses:

0000 0000: Reserved.

0000 0001: DATAST phase duration = 1*fmc\_ker\_ck clock cycles

0000 0010: DATAST phase duration = 2*fmc\_ker\_ck clock cycles

...

1111 1111: DATAST phase duration = 255*fmc\_ker\_ck clock cycles (default value after reset)

Bits 7:4 ADDHLD[3:0]: Address-hold phase duration.

These bits are written by software to define the duration of the address hold phase (refer to Figure 184 to Figure 185) used in asynchronous multiplexed accesses:

0000: Reserved.

0001: ADDHLD phase duration = 1*fmc\_ker\_ck clock cycle

0010: ADDHLD phase duration = 2*fmc\_ker\_ck clock cycle

...

1111: ADDHLD phase duration = 15*fmc\_ker\_ck clock cycles (default value after reset)

Note: In synchronous NOR flash accesses, this value is not used, and the address hold phase always lasts 1 flash clock period.

Bits 3:0 ADDSET[3:0]: Address setup phase duration.

These bits are written by software to define the duration of the address setup phase in fmc\_ker\_ck cycles (refer to Figure 186 to Figure 187) used in asynchronous accesses:

0000: ADDSET phase duration = 0*fmc\_ker\_ck clock cycle

...

1111: ADDSET phase duration = 15*fmc\_ker\_ck clock cycles (default value after reset)

Note: In synchronous accesses, this value is not used, and the address setup phase always lasts 1 flash clock period. In muxed mode, the minimum ADDSET value is 1.

FMC common configuration register (FMC_CFGR)

Address offset: 0x020

Reset value: 0x0000 0000

This register is user to set configuration common to all controllers

31302928272625242322212019181716
FMCENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.CCLKENCLKDIV[3:0]
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

Bit 31 FMCEN: FMC enable

This bit enables/disables the FMC.
0: FMC disabled
1: FMC enabled

Bits 30:24 Reserved, must be kept at reset value.

Bits 23:21 Reserved, must be kept at reset value.

Bit 20 CCLKEN: Continuous clock enable

This bit enables the FMC_CLK clock output to external memory devices.
0: The FMC_CLK is only generated during the synchronous memory access (read/write transaction). The FMC_CLK clock ratio is defined by the programmed CLKDIV value in the FMC_BCRx register (default after reset).
1: The FMC_CLK is generated continuously during asynchronous and synchronous access. If continuous clock mode is enabled, the synchronous memories connected to all memory regions are clocked by the same clock with the clock ratio defined by CLKDIV in FMC_CFGR. The CLKDIV value in FMC_BWTRx are don't care.

Bits 19:16 CLKDIV[3:0]: Clock divide ratio (for FMC_CLK signal)

These bits define the FMC_CLK clock output signal period, expressed in number of fmc_ker_ck cycles:
0000: Reserved.
0001: FMC_CLK period = 2 × fmc\_ker\_ck periods
0010: FMC_CLK period = 3 × fmc\_ker\_ck periods
1111: FMC_CLK period = 16 × fmc\_ker\_ck periods (default value after reset)
This value is don't care when accessing NOR flash memories, SRAM and PSRAM in asynchronous mode.

Note: Refer to Section 32.10.5: Synchronous transactions for FMC_CLK divider ratio formula.

Bits 15:0 Reserved, must be kept at reset value.

FMC size identification register (FMC_SIDR)

Address offset: 0x3FC

Reset value: 0xA3C5 DD01

31302928272625242322212019181716
SID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 SID[31:0]: Size Identification

These bits return the size of the memory region allocated to the FMC registers.

FMC identification register (FMC_IPIDR)

Address offset: 0x3F8

Reset value: 0x0014 0002

31302928272625242322212019181716
ID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID[15:0]
rrrrrrrrrrrrrrrr
Bits 31:0 ID[31:0] : FMC Identifier

These bits return the FMC identifier

FMC version register (FMC_VERR)

Address offset: 0x3F4

Reset value: 0x0000 0020

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 MAJREV[3:0] : Major revision

These bits return the FMC major revision

Bits 3:0 MINREV[3:0] : Minor revision

These bits return the FMC minor revision

FMC hardware configuration register 1 (FMC_HWCFGR1)

Address offset: 0x3F0

Reset value: 0x2232 9011

31302928272625242322212019181716
RA_LN2DPTH[3:0]WR_LN2DPTH[3:0]WD_LN2DPTH[3:0]WA_LN2DPTH[3:0]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID_SIZE[3:0]Res.Res.Res.SDRAM_SELRes.Res.Res.NAND_ECCRes.Res.Res.NAND_SEL
rrrrrrr

FMC hardware configuration register 2 (FMC_HWCFGR2)

Address offset: 0x3EC

Reset value: 0x11DC 4772

The base addresses are relevant only when the FMC includes the corresponding memory controller.

31302928272625242322212019181716
Res.Res.Res.SECURERes.Res.Res.PRIVILEGESDRAM2_BASE[3:0]SDRAM1_BASE[3:0]
rrrrrrrrrr
1514131211109876543210
NAND_BASE[3:0]SDRAM_RBASE[3:0]NOR_BASE[3:0]RD_LN2DPTH[3:0]
rrrrrrrrrrrrrrrr

Bits 31:29 Reserved, must be kept at reset value.

Bit 28 SECURE: Support for Arm® TrustZone®

0: no TrustZone

1: Support for TrustZone

Note: Arm and TrustZone are registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere

Bits 27:25 Reserved, must be kept at reset value.

Bit 24 PRIVILEGE: Support for Privileged mode

0: Privileged mode not supported

1: Privileged mode supported

Bits 23:20 SDRAM2_BASE[3:0]: SDRAM bank 2 base address

It returns bits [31:28] of SDRAM bank 2 base address space when the SDRAM controller is supported. It is ignored otherwise.

Bits 19:16 SDRAM1_BASE[3:0]: SDRAM bank 1 base address

It returns bits [31:28] of SDRAM bank 1 base address space when the SDRAM controller is supported. It is ignored otherwise.

Bits 15:12 NAND_BASE[3:0]: NAND base address

It returns bits [31:28] of NAND base address space

Bits 11:8 SDRAM_RBASE[3:0]: SDRAM remap base address

it returns bits [31:28] of SDRAM remap base address space when the SDRAM controller is supported. It is ignored otherwise.

Bits 7:4 NOR_BASE[3:0]: NOR base address

It returns bits [31:28] of NOR base address space

Bits 3:0 RD_LN2DPTH[3:0]: AXI read data FIFO depth

These bits return the AXI read data FIFO depth. depth is \(2^{RD\_LN2DPTH}\)

FMC hardware configuration register 3 (FMC_HWCFGR3)

Address offset: 0x3E8

Reset value: 0x0000 0037

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.CID_WIDTH[3:0]MAX_CID[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 CID_WIDTH[3:0]: CID bus width

This bitfield is relevant only when MAX_CID is not null in FMC_HWCFGR2.

0000: Width = 1

0001: Width = 2

0010: Width = 3

0011: Width = 4

Others: Reserved, must not be used.

Bits 3:0 MAX_CID[3:0]: Maximum compartment ID (or CID)

MAX_CID ranges from 0 to 15:

0000: no CID supported, DMA is not CID-aware

0001 to 1111: FMC is CID-aware and each channel is a separate CID-aware resource. n+1 CIDs, from CID0 up to CIDn, are supported.

32.11 NAND flash controller

The FMC generates the appropriate signal timings to drive 8- and 16-bit NAND flash memories

The NAND memory region is configured through dedicated registers (Section 32.11.9). The programmable memory parameters include access timings (shown in Table 253) and ECC configuration.

The NAND controller supports the following features:

Table 253. Programmable NAND flash access parameters

ParameterFunctionAccess modeUnitMin.Max.
Memory setup timeNumber of clock cycles (fmc_ker_ck) required to set up the address before the command assertionRead/WriteFMC clock cycle (fmc_ker_ck)1256
Memory waitMinimum duration (in fmc_ker_ck clock cycles) of the command assertionRead/WriteFMC clock cycle (fmc_ker_ck)1256
Table 253. Programmable NAND flash access parameters (continued)
ParameterFunctionAccess modeUnitMin.Max.
Memory holdNumber of clock cycles (fmc_ker_ck) during which the address must be held (as well as the data if a write access is performed) after the command deassertionRead/WriteFMC clock cycle (fmc_ker_ck)1256
Memory databus high-ZNumber of clock cycles (fmc_ker_ck) during which the data bus is kept in high-Z state after a write access has startedWriteFMC clock cycle (fmc_ker_ck)1256

32.11.1 External memory interface signals

The following tables list the typical signals that are used to interface NAND flash memory.

Note: The “N” prefix identifies the signals which are active low.

8-bit NAND flash memory

Table 254. 8-bit NAND flash memory
FMC signal nameI/OFunction
A[17]ONAND flash address latch enable (ALE) signal
A[16]ONAND flash command latch enable (CLE) signal
D[7:0]I/O8-bit multiplexed, bidirectional address/data bus
NCExOChip Select (x=1, 2, 3, 4)
NOE(= NRE)OOutput enable (memory signal name: read enable, NRE)
NWEOWrite enable
RNBINAND flash Ready/Busy (RNB) input signal to the FMC

Note: Theoretically, there is no capacity limitation as the FMC can manage as many address cycles as needed.

16-bit NAND flash memory

Table 255. 16-bit NAND flash memory
FMC signal nameI/OFunction
A[17]ONAND flash address latch enable (ALE) signal
A[16]ONAND flash command latch enable (CLE) signal
D[15:0]I/O16-bit multiplexed, bidirectional address/data bus
NCExOChip Select (x=1, 2, 3, 4)
NOE(= NRE)OOutput enable (memory signal name: read enable, NRE)

Table 255. 16-bit NAND flash memory (continued)

FMC signal nameI/OFunction
NWEOWrite enable
RNBINAND flash Ready/Busy (RNB) input signal to the FMC

Note: Theoretically, there is no capacity limitation as the FMC can manage as many address cycles as needed.

32.11.2 NAND flash supported memories and transactions

Table 256 shows the supported devices, access modes and transactions. Transactions not allowed (or not supported) by the NAND flash controller are shown in gray.

Table 256. Supported memories and transactions

DeviceModeR/WAXI data sizeMemory data sizeAllowed/ not allowedComments
NAND 8-bitAsynchronousR88Y
AsynchronousW88Y
AsynchronousR168YSplit into 2 FMC accesses
AsynchronousW168YSplit into 2 FMC accesses
AsynchronousR328YSplit into 4 FMC accesses
AsynchronousW328YSplit into 4 FMC accesses
AsynchronousR648YSplit into 8 FMC accesses
AsynchronousW648YSplit into 8 FMC accesses
NAND 16-bitAsynchronousR816Y
AsynchronousW816N
AsynchronousR1616Y
AsynchronousW1616Y
AsynchronousR3216YSplit into 2 FMC accesses
AsynchronousW3216YSplit into 2 FMC accesses
AsynchronousR6416YSplit into 4 FMC accesses
AsynchronousW6416YSplit into 4 FMC accesses

32.11.3 Timing diagrams for NAND flash memory

The NAND flash memory region is managed through a set of registers:

Each timing configuration register contains three parameters used to define the number of fmc_ker_ck cycles for the different phases of any NAND flash access, plus one parameter that defines the timing to start driving the data bus when a write access is performed.

Figure 191 shows the timing parameter definitions for common memory accesses, knowing that Attribute memory space access timings are similar.

Figure 191. NAND flash controller waveforms for common memory access

Timing diagram for common memory access showing fmc_ker_ck, NCEx, NWE/NOE, Write_data, and Read_data signals. It defines parameters MEMxSET+1, MEMxWAIT+1, MEMxHOLD+1, and MEMxHIZ+1. Includes reference MSv45382V2.

The diagram shows the following signals and timing parameters:

MSv45382V2

Timing diagram for common memory access showing fmc_ker_ck, NCEx, NWE/NOE, Write_data, and Read_data signals. It defines parameters MEMxSET+1, MEMxWAIT+1, MEMxHOLD+1, and MEMxHIZ+1. Includes reference MSv45382V2.
  1. 1. NOE remains high (inactive) during write accesses. NWE remains high (inactive) during read accesses.
  2. 2. If PWAITEN = 1, the programmed values of (MEMxSET + MEMxHOLD) must be > 1.

Figure 192. NAND flash controller waveforms for TCLR and TAR timings

Timing diagram for TCLR and TAR timings showing fmc_ker_ck, NCEx, A16/17 (CLE/ALE), NWE, and NOE signals. It defines the relationship TCLRFMC/TARFMC + 1 >= TCLRMEM/TARMEM. Includes reference MSv45383V1.

The diagram shows the following signals and timing parameters:

MSv45383V1

Timing diagram for TCLR and TAR timings showing fmc_ker_ck, NCEx, A16/17 (CLE/ALE), NWE, and NOE signals. It defines the relationship TCLRFMC/TARFMC + 1 >= TCLRMEM/TARMEM. Includes reference MSv45383V1.
  1. 1. NOE remains high (inactive) during write accesses. NWE remains high (inactive) during read accesses.

32.11.4 NAND flash operations

The command latch enable (CLE) and address latch enable (ALE) signals of the NAND flash memory device are driven by address signals from the FMC. This means that to send a command or an address to the NAND flash memory, the CPU has to perform a write to a specific address in its memory space.

A typical page read operation from the NAND flash device requires the following steps:

  1. 1. Program and enable the NAND memory region by configuring the FMC_PCR and FMC_PMEM (and for some devices, FMC_PATT, see Section 32.11.5: NAND flash prewait function) registers according to the characteristics of the NAND flash memory (PWID bits to configure NAND flash data bus width, PWAITEN set or cleared as needed, see Section 32.7.2: NAND flash memory address mapping for timing configuration).
  2. 2. The CPU performs a byte write to the common memory space, with a data byte value equal to one flash command byte (for example 0x00 for Samsung NAND flash devices). The NAND flash CLE input is active during the write strobe (low pulse on NWE), so that the written byte is interpreted as a command by the NAND flash memory. Once the command is latched by the memory device, it does not need to be written again for the following page read operations.
  3. 3. The CPU can send the start address for a read operation by writing a five-byte address to the common memory or the attribute space followed by the second read command. The NAND flash ALE input is active during the write strobe (low pulse on NWE), so that the written bytes are interpreted as the start address for read operations. Using the attribute memory space allows to use a different FMC timing configuration, which can be used to implement the prewait function required for some NAND flash memories (see details in Section 32.11.5: NAND flash prewait function).
  4. 4. The controller waits till the NAND flash memory is ready (RNB signal high), before starting a new access to the same memory region or to another memory region.
  5. 5. The CPU can then perform byte read operations from the common memory space to read the NAND flash page (data field + Spare field) byte by byte.
  6. 6. No CPU command or address write operation is required to read the next NAND flash page. This can be done in three different ways:
    • – by simply performing the operation described in step 5,
    • – a new random address can be accessed by restarting the operation at step 3,
    • – a new command can be sent to the NAND flash device by restarting at step 2.

Note: Non-‘CE don’t care’ NAND flash memories are not supported.

ONFI mode 4 and 5 EDO data output cycle timings are not supported.

32.11.5 NAND flash prewait function

The NAND controller must wait for RNB to be asserted low before sending its next command (see Figure 193). This timing constraint is set according to \(t_{WB}\) using MEMHOLD[7:0] bitfield in FMC_PMEM or ATTHOLD[7:0] in FMC_PATT.

Figure 193. Access to NAND flash memory

Timing diagram for NAND flash memory access showing signals NCE, CLE, ALE, NWE, NOE, I/O[7:0], and RNB. NCE is active low. CLE and ALE are active high. NWE is a strobe. NOE is active high. I/O[7:0] shows a sequence of CMD, ADD1, ADD2, ADD3, and ADD4. RNB is active low. Timing parameters tR and tWB are indicated. Annotations (1) and (2) refer to notes below the diagram.

The diagram illustrates the timing for a NAND flash memory access. It shows the following signals and their relationships:

Timing parameters shown include \(t_R\) (read time) and \(t_{WB}\) (write prewait time). Annotations (1) and (2) refer to the notes below the diagram.

Timing diagram for NAND flash memory access showing signals NCE, CLE, ALE, NWE, NOE, I/O[7:0], and RNB. NCE is active low. CLE and ALE are active high. NWE is a strobe. NOE is active high. I/O[7:0] shows a sequence of CMD, ADD1, ADD2, ADD3, and ADD4. RNB is active low. Timing parameters tR and tWB are indicated. Annotations (1) and (2) refer to notes below the diagram.
  1. 1. NCE can be deasserted for NAND flash memories since CE is don't care except for very old NAND flash devices that are not considered in this example.
  2. 2. RNB sampling can be delayed after \(t_{WB}\) by using ATTHOLD[7:0] bit of FMC_PATT. As an example, if fmc_ker_clk = 14 ns and ATTHOLD[7:0] = 7, the delay is 8*14 = 112 ns. The usual \(t_{WB}\) maximum value is 100 ns and the programmed delay must be higher than \(t_{WB} + 2 * fmc\_ker\_clk\).

Any CPU read or write access to the NAND flash memory has a delay of (MEMHOLD[7:0]+1)*fmc_ker_ck cycles after the NWE signal is asserted.

The ATTHOLD[7:0] bitfield in FMC_PATT register must be determined to satisfy \(t_{WB}\) timing constraints and selectively apply larger timing constraints to the last command or address byte in CPU mode. When setting ATTHOLD[7:0], the 2*fmc_ker_ck delay required for the sampling of RNB by NAND sequencer must also be taken into account.

32.11.6 NAND ECC controller

NAND flash memories include a spare memory area (or OOB) at the end of each page. This area is typically used to store some metadata (such as Bad Block Marker information to invalidate the whole page) or for error management functions.

The FMC supports on-the-fly error correction code (ECC) computation during data read/program from/to NAND flash memory. This mechanism reduces the host CPU workload when processing the ECC by software.

The user application can select one out of two algorithms:

The principle of both ECC controllers is similar: the ECC modules monitor the NAND flash data bus and read/write signals (NCE and NWE) each time the NAND flash memory region is active. The ECC controllers operate as follows:

Once the desired number of bytes has been read/written from/to the NAND flash memory by the host CPU or DMA, the ECC result registers are updated.

Hamming code

The Hamming code implemented can perform 1-bit error correction and 2-bit error detection per 256, 512, 1024, 2048, 4096 or 8192 bytes read or written from/to the NAND flash memory. It consists in calculating the row and column parity. This algorithm is supported by 8-bit and 16-bit NAND flash memories.

Page write and read sequences with Hamming code are described below.

To perform a page program with Hamming ECC computation:

  1. 1. Enable the ECCEN bit in the FMC_PCR register.
  2. 2. Write data to the NAND flash memory page. While the NAND page is written, the ECC controller computes the ECC value.
  3. 3. Wait until the ECC code is ready (NWRF is set in the FMC_SR register).
  4. 4. Read the ECC value available in the FMC_HECCR register and store it in NAND flash spare area.
  5. 5. Clear the ECCEN bit and launch the page programming.

To perform a page read with Hamming ECC computation:

  1. 1. Enable the ECCEN bit in the FMC_PCR register before reading the NAND page. While the NAND page is read, the ECC block computes the ECC value.
  2. 2. Wait until the ECC code is ready (NWRF set in the FMC_SR register).
  3. 3. Read the ECC value available in the spare area as well also the ECC value, processed by Hamming controller, available in FMC_HECCR register.
  4. 4. If the two ECC values are identical, no correction is required. Otherwise an ECC error occurred, the software correction routine returns information on whether the error can be corrected or not, and corrects it when possible.

Depending on the spare area size, the page can be split into several sectors of identical size. This allows increasing the error correction capability for each page since 1 error can be corrected and 2 errors can be detected for each sector.

Example

For a NAND flash memory with 2 Kbytes + 64 bytes pages, each page can be split into 8 sectors of 256 bytes each. 3 bytes (22 bits) of ECC are required for each sector, which makes 24 bytes (8 * 3 bytes) to be stored in the spare area for the whole page. For the whole 2 Kbyte page, up to 8 errors can be corrected, respectively up to 16 errors detected, provided there is less than 1 error, respectively 2 errors, per sector.

BCH (Bose, Chaudhuri and Hocquenghem) code

To increase the error correction capability, the FMC embeds a BCH (Bose, Chaudhuri and Hocquenghem) encoder and decoder.

It supports 4-bit error code correction and 8-bit error detection or 8-bit error code correction, and 16-bit error detection per sector. BCH encoder/decoder module handles sectors of fixed size, equal to 512 bytes. Each page must consequently be split into 512-byte sectors. The number of parity bytes generated for each sector is given in Table 257. For 16-bit NAND flash memories, a padding is added to align parity bytes to an even number (8 bytes and 14 bytes for 4-bit and 8-bit BCH code, respectively).

Table 257. Number of ECC parity bytes per sector

FunctionBCH code
4-bit8-bit
Error correction
Number of parity bytes7 bytes13 bytes

The BCH module detects errors and returns the bit position for each sector. To correct the errors, the software needs to flip the error bits at the provided bit position stored in the FMC_BCHPBRx register.

The BCH ECC controller supports 8-bit and 16-bit NAND flash memories.

During a page program operation, the BCH encoder generates the ECC bytes (7 or 13 bytes) for each sector of 512 bytes that must be written in the NAND flash spare area with a programmable offset. It must take into account some metadata at the beginning of the spare area. This operation must be executed for each sector. The BCH encoder does not process the spare area: metadata must have their own error protection mechanism.

The total number of ECC bytes (N) is given by the below equation:

\[N = \text{Number of ECC bytes /sector} \times \text{Number of sector/page}\]

Example

For an 8-bit NAND flash with 4096-byte pages and an error correction capability of 4-bit per 512 bytes, the number of sector per page is 8 (4096 / 512). The total number of ECC bytes is consequently:

\[N = 7 \times 8 = 56 \text{ bytes}\]

The user application has to make sure that the spare area is large enough to store the metadata and parity bytes.

Page program and read sequences with BCH code are described below.

To perform a page program:

  1. 1. Enable write access by setting the WEN bit in the FMC_PCR register.
  2. 2. Enable the ECC by setting the ECCEN bit in FMC_PCR register.
  3. 3. Write 512 data bytes to the sector in the NAND flash memory page. While the sector is written, the BCH encoder computes the ECC value.
  4. 4. Wait until the BCH encoder parity bits are available by monitoring EPBRF bit of FMC_BCHISR register.
  5. 5. Read the ECC value available in the FMC_BCHPBRx registers and store it in the NAND flash spare area.
  6. 6. Disable ECC by resetting the ECCEN bit in FMC_PCR register.
  7. 7. Execute again step 2 to 6 for all sectors to be written in NAND flash memory.
  8. 8. Launch the page programming.

To perform a page read:

  1. 1. Enable read access by resetting the WEN bit in the FMC_PCR register.
  2. 2. Enable the ECC by setting the ECCEN bit in FMC_PCR register.
  3. 3. Read the NAND page sector (512 bytes).
  4. 4. Read the corresponding ECC bytes (7 or 13 bytes) from the NAND flash spare area.
  5. 5. During the read of data and parity bits, the syndrome is calculated. Then the error location search is launched.
  6. 6. Wait until the decoding error is ready (DERF bit set in the FMC_BCHISR register), then read the decoding results (errors detected if any, correctable or not, number of errors, bit position) in FMC_BCHDSR0 and FMC_BCHDSRx registers.
  7. 7. Thanks to the decoding results, the software can correct the errors in the sector (when possible).
  8. 8. Disable ECC by resetting the ECCEN bit in FMC_PCR register.
  9. 9. Execute again step 2 to 7 for all relevant sectors of the page.

32.11.7 FMC command sequencer

NAND flash page programming and reading can be performed by the CPU as described in the above sections.

Data sector programming/reading as well as ECC byte programming/reading can also be managed automatically by the FMC command sequencer for command and address transfers, and by DMA for data transfers.

The purpose of the command sequencer is to ease the programming/reading of NAND flash pages with ECC computation as well as free the CPU of sequencing tasks. The command sequencer enables the software to work on full NAND flash pages instead of sectors, which is more efficient and essential to achieve high throughput. The sequencer handles all the sectors in the page. It does not support sub-page read or program operations.

One DMA channel is required for write operations and two DMA channels for read operations.

A specific NAND flash page layout must be respected when using the BCH algorithm. See Figure 194 for an example of 2Kbyte page BCH layout.

Figure 194. NAND flash page (2 Kbytes) layout with BCH

Diagram of NAND flash page (2 Kbytes) layout with BCH. The page is divided into five sectors: Sector 0, Sector 1, Sector 2, Sector 3, and a Spare area. A double-headed arrow below Sector 0 and Sector 1 indicates a width of 512 bytes. A longer double-headed arrow below all sectors indicates the total Page size. The reference code MSv45384V1 is in the bottom right corner.

The diagram illustrates the layout of a 2 Kbyte NAND flash page. It is divided into five rectangular blocks labeled 'Sector 0', 'Sector 1', 'Sector 2', 'Sector 3', and 'Spare area'. Below 'Sector 0' and 'Sector 1', a horizontal double-headed arrow is labeled '512 bytes'. Below the entire row of sectors, a longer horizontal double-headed arrow is labeled 'Page size'. In the bottom right corner of the diagram area, the text 'MSv45384V1' is present.

Diagram of NAND flash page (2 Kbytes) layout with BCH. The page is divided into five sectors: Sector 0, Sector 1, Sector 2, Sector 3, and a Spare area. A double-headed arrow below Sector 0 and Sector 1 indicates a width of 512 bytes. A longer double-headed arrow below all sectors indicates the total Page size. The reference code MSv45384V1 is in the bottom right corner.

Page program sequence

  1. 1. A data buffer located in SRAM has to be initialized with the data to be written to the NAND flash page.
  2. 2. The CPU configures the FMC command sequencer registers: page program command (0x80), address bytes, change write column command (0x85), ECC address offset, page size, sector size and sector number. It also selects the chip enable. It also selects the ECC algorithm (Hamming or BCH) and configures one DMA channel to transfer data from the buffer to the NAND flash page.
  3. 3. The CPU then launches the sequencer by setting the CSQSTART bit in the FMC_CSQCR register.
  4. 4. The command sequencer automatically generates the control and address cycles to the NAND flash memory, following the programmed timings configured either in FMC_PMEM or FMC_PATT register.
  5. 5. A DMA request is issued to start data transfer from the data buffer to NAND flash memory.
  6. 6. When the full sector is programmed, go to step 7 if ECC is enabled. Otherwise, jump to step 9.
  7. 7. The FMC command sequencer automatically issues a change write column command (0x85) followed by two address cycles. The command to be issued and the number of address cycles are programmed in FMC_CSQCFGR2 register. The address is automatically generated from the programmed ECC address offset.
  8. 8. Once the parity bytes are available in ECC encoder (Hamming or BCH) module, they are automatically transferred to the NAND flash spare area. The FMC command sequencer can generate a sector transfer complete interrupt if it has been previously enabled.
  9. 9. The sequencer then repeats step 4 (except that it performs only a change write column command instead of a page program command) to step 8 to program the following sectors and their corresponding ECC parity bytes. The ECC address offset is automatically incremented for each sector transfer. When ECC is disabled, the sequencer repeats step 5.
  10. 10. The FMC command sequencer can generate a transfer complete interrupt or a transfer complete error interrupt by sector or when all sectors are written.
  11. 11. The CPU can program any further metadata in the NAND flash area, taking care not to overwrite parity bytes.
  12. 12. The program command (0x10) can then be written to the command section to program the NAND flash memory.
  1. An interrupt, if enabled, is generated on the rising edge of the Ready/Busy (RNB) signal to indicate that the page program operation is complete.

Refer to Figure 195 for an overview of the page program sequence with BCH.

Figure 195. Example of 2 Kbyte page program sequence with 4-bit BCH

Diagram of a 2 Kbyte page program sequence with 4-bit BCH, showing three operations: Operation 1 (Program first sector), Operation 2 (Program sector data ECC), and Operation 3 (Program next sector).

The diagram illustrates the sequence of operations for programming a 2 Kbyte page with 4-bit BCH. It shows three main operations:

The diagram shows the sequence of operations: Operation 1, followed by Operation 2, then Operation 3, then Operation 2 again, and finally Operation 3. The sequence continues with sector 3 and 4 using Operation 2 and Operation 3. An interrupt request (IRQ) is generated at the end of the sequence.

Operation 1: Program first sector
Operation 2: Program sector data ECC
Operation 3: Program next sector

MSv45393V4

Diagram of a 2 Kbyte page program sequence with 4-bit BCH, showing three operations: Operation 1 (Program first sector), Operation 2 (Program sector data ECC), and Operation 3 (Program next sector).

Page read sequence

  1. A data buffer is allocated in SRAM to store the NAND flash page data. A decoding status buffer is also allocated to store result of ECC decoding.
  2. The CPU programs the command sequencer registers: the page read first cycle command (0x00), address bytes, the page read second cycle command (0x30), change read column command (0x05), spare area offset, page size, sector size and sector number. It also selects the chip enable.
  3. It configures the ECC algorithm if required (Hamming or BCH), one DMA channel to handle data transfers from the NAND flash page to the data buffer, and a second DMA
  1. channel to transfer ECC decoding results from ECC status registers to the RAM decoding status buffer.
  2. 3. The CPU then launches the FMC sequencer by setting the CSQSTART bit in the FMC_CSQCR register.
  3. 4. The FMC command sequencer issues the command and address cycles to the NAND flash memory.
  4. 5. The command sequencer waits for a Ready/Busy (RNB) rising edge to start data transfer.
  5. 6. It sends a DMA request to launch the data transfer from the NAND flash page to the data buffer.
  6. 7. When all sector data are read, go to step 8 if ECC is enabled, otherwise go to step 9. The FMC command sequencer can generate a sector transfer complete interrupt if it has been previously enabled.
  7. 8. When ECC status registers are empty (because the Hamming error code or the BCH error position bits of previous sector have already been read), the ECC command sequencer automatically issues a change read column command (0xE0) followed by two address cycles and by the 0xE0 command, to read ECC bytes from NAND flash memory and store them in ECC registers. These commands as well as the number of address cycles are programmed in the FMC_CSQCFGR2 register (see Figure 196). The address in spare area is extracted from the programmed ECC address offset. When the Hamming algorithm is used, a DMA request to the second DMA channel is sent to transfer ECC codes (FMC_HPR and FMC_HECCR registers) to the decoding status buffer. When BCH algorithm is used, once all the parity bytes have been read, the BCH decoder first processes the syndrome to detect errors and then searches for error positions if any. As the BCH decoder is pipelined, it is possible to start reading a sector even if the decoding of the previous sector is not complete. In parallel of the following steps, when BCH sector decoding is complete, the new error status is stored in the ECC status registers (FMC_BCHDSR0) and a DMA request to the second DMA channel is sent to transfer data from the status registers to the decoding status buffer located in RAM.
  8. 9. The FMC command sequencer then repeats step 4 (except that a change read column command is issued instead of the page read first cycle command) to step 8 to read the other sectors and their corresponding ECC bytes. The addresses are issued and incremented following the page size, number of sectors, spare area address offset address and BCH code selection. When the read sequence is complete, the command sequencer waits for \(t_{RHWL}\) before issuing a new command sequence (refer to Figure 195). When ECC is disabled, the sequencer repeats step 6.
  9. 10. Once all sectors within a page and the status registers (FMC_BCHDSRx) are transferred by the command sequencer, the ECC controller can generate the transfer complete interrupt or transfer complete error (when enabled).
  10. 11. By reading the decoding status buffer, the CPU can start processing the errors corresponding to each sector. If no error has been detected, the page stored in RAM is validated. Otherwise the CPU corrects the error(s) before validating the page buffer in RAM. If there are too many errors, the CPU can detect the page cannot be corrected and invalidate the data buffer.

Following the selected BCH code, if the number of detected errors exceeds the number of correctable errors, this bit is not significant and the DUE bit is set. If the number of errors the detected by the BCH decoder exceeds the maximum number of detectable errors, DEN and DUE bits are not significant.

The DMA channels can also send interrupts each time a data transfer is complete. This allows the CPU to process error(s) in a sector as soon as it is available.

Note: When using the sequencer and DMA channels, the CPU must not read the FMC_BCHPBRx and FMC_BCHDSRx registers before data of all sectors are transferred, that is when TCF flag is set in the FMC_CSQISR register.

Figure 196. Chained-page read command timings

Timing diagram for chained-page read command showing sequences of d512, cmd1, c1, c2, cmd2, d1, d7 blocks with timing parameters tRHW and tCCS.
Timing diagram for chained-page read command showing sequences of d512, cmd1, c1, c2, cmd2, d1, d7 blocks with timing parameters tRHW and tCCS.

An example of 2 Kbyte page read sequence with BCH is described in Figure 197. This example corresponds to four 512-byte sectors and 7 ECC bytes per data 512 bytes.

Figure 197. Example of 2-Kbyte page read sequence with 4-bit BCH

Timing diagram for a 2-Kbyte page read sequence with 4-bit BCH. The diagram shows four operations: Operation 1 (Read first sector), Operation 2 (Read sector data ECC), and Operation 3 (Read next sector). It details the sequence of commands (0x00, 0x05, 0x30, 0xE0), control signals (c1, c2), and data blocks (r1, r2, r3, d1, d7, d512). Timing parameters include t_R, t_RHW, and t_CCS. A legend defines the operations and an IRQ signal for end of page transfer or error detection.

The diagram illustrates the sequence of operations for reading a 2-Kbyte page with 4-bit BCH. It shows the flow of commands and data blocks over time, with specific timing constraints.

Legend:

MSv45394V3

Timing diagram for a 2-Kbyte page read sequence with 4-bit BCH. The diagram shows four operations: Operation 1 (Read first sector), Operation 2 (Read sector data ECC), and Operation 3 (Read next sector). It details the sequence of commands (0x00, 0x05, 0x30, 0xE0), control signals (c1, c2), and data blocks (r1, r2, r3, d1, d7, d512). Timing parameters include t_R, t_RHW, and t_CCS. A legend defines the operations and an IRQ signal for end of page transfer or error detection.

The BCH controller resets the ECC computation whenever a page read (0x00), a page program (0x80), a random read (0x05) or a random program command ((0x85) is issued.

When only part of a page is written/read using the BCH, the command sequencer issues a random read/write command sequence only for the number of sectors to be read/written. This is done by programming the number of sector to be processed.

FMC command sequencer configuration

  1. 1. Configure the FMC_CSQCFGR1 register: program the command1 and the command 2 (in case of read access), the number of address cycles to be issued, configure the read or write sequence, and select the timings to be used.
  2. 2. Configure the address bytes in FMC_CSQAR1 and FMC_CSQAR2 register.
  3. 3. In the FMC_CSQCFGR2 register, configure the change write or change read column commands and the timings to be used for ECC. Program the address offset for the random columns in the FMC_CSQAR2 register. Enable the DMA if it is needed for ECC status register transfer.
  4. 4. Configure the number of sectors and the address cycle timings in the FMC_CSQCFGR3 register.
  5. 5. Configure the ECC sector size, and select read or write access in the FMC_PCR register.
  6. 6. Enable the SQSDTEN bit in the FMC_CSQFCGR2 register. The ECCEN bit in the FMC_PCR register kept at 0.
  7. 7. Transfer complete, and transfer error complete or sector transfer complete can be enabled through the FMC_CSQIER register.

32.11.8 NAND flash controller interrupt

An interrupt can be generated on the following events:

The interrupt source can be enabled or disabled separately through the FMC_IER, FMC_CSQIER and FMC_BCHIER registers.

Table 258. FMC NAND controller Interrupt request

Interrupt eventEvent FlagEnable control bit
Transfer completeTCF in FMC_CSQISRTCIE in FMC_CSQIER
Sector completeSCF in FMC_CSQISRSCIE in FMC_CSQIER
Sector errorSEF in FMC_CSQISRSEIE in FMC_CSQIER
Sector uncorrectable errorSUEF in FMC_CSQISRSUEIE in FMC_CSQIER
Command transfer completeCMDTCF in FMC_CSQISRCMDTCIE in FMC_CSQIER
BCH encoder parity bits readyEPBRF in FMC_BCHISREPBRIE in FMC_BCHIER
BCH decoder syndrome readyDSRF in FMC_BCHISRDSRIE in FMC_BCHIER
BCH decoder error foundDEFF in FMC_BCHISRDEFIE in FMC_BCHIER

Table 258. FMC NAND controller Interrupt request (continued)

Interrupt eventEvent FlagEnable control bit
BCH decoder error readyDERF in FMC_BCHISRDERIE in FMC_BCHIER
BCH decoder uncorrectable errorDUEF in FMC_BCHISRDUEIE in FMC_BCHIER

32.11.9 NAND flash controller registers

NAND flash programmable control register (FMC_PCR)

Address offset: 0x80

Reset value: 0x0007 FE08

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.WENBCHECCRes.Res.Res.Res.ECCSS[2:0]TAR[3]
rwrwrwrwrwrw
1514131211109876543210
TAR[2:0]TCLR[3:0]ECCALGRes.ECCENPWID[1:0]Res.PBKENPWAITENRes.
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:26 Reserved, must be kept at reset value.

Bit 25 WEN : Write enable

This bit enables read or write access. It must be configured when using the FMC sequencer or when the ECC with BCH code is enabled. It can only be modified when ECCEN bit is reset.

0: Read access enabled

1: Write access enabled

Bit 24 BCHECC : BCH error correction capability

0: 4-bit BCH (4-bit error correction and 8-bit error detection per 512 bytes)

1: 8-bit BCH (8-bit error correction and 16-bit error detection per 512 bytes)

Bits 23:20 Reserved, must be kept at reset value.

Bits 19:17 ECCSS[2:0] : ECC sector size (used to access spare area)

These bits define the sector size used for the ECC:

000: 256 bytes

001: 512 bytes

010: 1024 bytes

011: 2048 bytes (default)

100: 4096 bytes

101: Reserved.

11X: Reserved.

When the ECC is enabled with BCH code, the sector size must be programmed to 512 bytes.

Bits 16:13 TAR[3:0]: ALE to RE delay.

These bits define the time from ALE low to RE low in number of \(t_{fmc\_ker\_ck}\) clock cycles:

\[t_{ar} \leq (TAR + 1) \times t_{fmc\_ker\_ck}\]

where \(t_{fmc\_ker\_ck}\) is the FMC clock period and \(t_{ar}\) is the ALE to RE timing of NAND flash memories.

0000: 1 * \(t_{fmc\_ker\_ck}\) cycle

1111: 16 * \(t_{fmc\_ker\_ck}\) cycles (default)

Bits 12:9 TCLR[3:0]: CLE to RE delay.

These bits define the time from CLE low to RE low in number of \(t_{fmc\_ker\_ck}\) clock cycles:

\[t_{clr} \leq (TCLR + 1) \times t_{fmc\_ker\_ck}\]

where \(t_{fmc\_ker\_ck}\) is the FMC clock period and \(t_{clr}\) is the CLE to RE timing of NAND flash memories.

0000: 1 * \(t_{fmc\_ker\_ck}\) cycle

1111: 16 * \(t_{fmc\_ker\_ck}\) cycles (default)

Bit 8 ECCALG: ECC algorithm

0: Hamming code is selected (default).

1: BCH code is selected.

Bit 7 Reserved, must be kept at reset value.

Bit 6 ECCEN: ECC computation logic enable bit

0: ECC logic is disabled and reset (default after reset),

1: ECC logic is enabled.

This bit must be kept reset when using the FMC sequencer

Bits 5:4 PWID[1:0]: Data bus width

These bits define the external memory device width.

00: 8 bits (default after reset).

01: 16 bits

1X: Reserved.

Bit 3 Reserved, must be kept at reset value.

Bit 2 PBKEN: NAND flash memory region enable bit

This bit enables the memory region. Accessing a disabled memory region causes an AXI bus error.

0: Corresponding memory region is disabled (default after reset)

1: Corresponding memory region is enabled.

Note: The NAND flash memory region must be disabled only when all NAND flash controller commands are complete.

Bit 1 PWAITEN: Wait feature enable bit

This bit enables the Wait feature for the NAND flash memory region:

0: disabled (default)

1: enabled

Bit 0 Reserved, must be kept at reset value.

FMC status register (FMC_SR)

Address offset: 0x84

Reset value: 0x0000 0053

This register contains information about the AXI interface isolation status and the NAND write requests status. The FMC has to be disabled before modifying some registers. As requests might be pending, it is necessary to wait till the AXI interface is stable and the core of the block is totally isolated from its AXI interface before reconfiguring the registers.

The PEF and NWEF bits indicate the status of the pipe. If Hamming algorithm is used, the ECC is calculated while data are written to the memory. To read the correct ECC, the software must consequently wait until no write request to the NAND controller are pending, by polling PEF and NWRF bits.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.NWRFRes.PEFRes.Res.ISOST[1:0]
rrrr

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 NWRF : NAND write request flag

This bit provides the status of the write request issued to the NAND flash memory. When this bit is set, all write requests to the NAND controller are served.

0: NAND flash write requests are pending

1: No NAND flash write requests pending

Bit 5 Reserved, must be kept at reset value.

Bit 4 PEF : Pipe Empty Flag

This bit indicates if the pipe contains requests.

Bits 3:2 Reserved, must be kept at reset value.

Bits 1:0 ISOST[1:0] : FMC isolation state with respect to the AXI interface

00: FMC is not isolated; AXI transactions are treated by the FMC and its controllers.

01: FMC has been enabled (FMCEN = 1) and waits for the end of pending AXI transactions (which leads to error responses) before going to “non-isolated” state.

10: FMC has been disabled (FMCEN = 0) and waits for the end of pending AXI transactions before going to isolation state.

11: FMC is isolated from its AXI interface. All AXI requests lead to error responses.

FMC common memory space timing register (FMC_PMEM)

Address offset: 0x88

Reset value: 0x0A0A 0A0A

The FMC_PMEM read/write register contains NAND flash memory region timing information. This information is used to access the NAND flash common memory space for command, address write accesses or data read/write accesses.

31302928272625242322212019181716
MEMHIZ[7:0]MEMHOLD[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MEMWAIT[7:0]MEMSET[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 MEMHIZ[7:0]: Common memory data bus Hi-Z time

These bits define the number of fmc_ker_ck clock cycles (+1) during which the data bus is kept Hi-Z after starting a NAND flash write access to the common memory space. This is only valid for write transactions:

0000 0000: 1 * fmc_ker_ck cycle

0000 0001: 2 * fmc_ker_ck cycles

.....

1111 1111: 256 * fmc_ker_ck cycles

Bits 23:16 MEMHOLD[7:0]: Common memory hold time

These bits define the number of fmc_ker_ck clock cycles (+1) during which the address is held (and data for write accesses) after the command is deasserted (NWE, NOE), during NAND flash read or write accesses to the common memory space:

0000 0000: 1 * fmc_ker_ck cycle

0000 0001: 2 * fmc_ker_ck cycles

.....

1111 1111: 256 * fmc_ker_ck cycles

Bits 15:8 MEMWAIT[7:0]: Common memory wait time

These bits define the minimum number of fmc_ker_ck clock cycles (+1) to assert the command (NWE, NOE), during NAND flash read or write accesses to the common memory space. The duration of command assertion is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value of fmc_ker_ck:

0000 0000: 1 * fmc_ker_ck cycles (+ wait cycle introduced by deasserting NWAIT)

0000 0001: 2 * fmc_ker_ck cycles (+ wait cycle introduced by deasserting NWAIT)

.....

1111 1111: 256 * fmc_ker_ck cycles (+ wait cycle introduced by deasserting NWAIT)

Bits 7:0 MEMSET[7:0]: Common memory setup time

These bits define the number of fmc_ker_ck clock cycles (+1) to set up the address before the command assertion (NWE, NOE), during NAND flash read or write accesses to the common memory space:

0000 0000: 1 * fmc_ker_ck cycles

0000 0001: 2 * fmc_ker_ck cycles

.....

1111 1111: 256 * fmc_ker_ck cycles

FMC attribute memory space timing registers (FMC_PATT)

Address offset: 0x8C

Reset value: 0x0A0A 0A0A

The FMC_PATT read/write register contains NAND flash memory region timing information. It is used for 8-bit accesses to the NAND flash attribute memory space during the last address write access when the timing differs from previous accesses (for Ready/Busy management, refer to Section 32.11.5: NAND flash prewait function).

31302928272625242322212019181716
ATTHIZ[7:0]ATTHOLD[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
ATTWAIT[7:0]ATTSET[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 ATTHIZ[7:0]: Attribute memory data bus Hi-Z time

These bits define the number of fmc_ker_ck clock cycles (+1) during which the data bus is kept in Hi-Z after starting a NAND flash write access to the attribute memory space. These bits are only valid for write transactions:

0000 0000: 1 * fmc_ker_ck cycle

0000 0001: 2 * fmc_ker_ck cycle

.....

1111 1111: 256 * fmc_ker_ck cycles

Bits 23:16 ATTHOLD[7:0]: Attribute memory hold time

These bits define the number of fmc_ker_ck clock cycles (+1) during which the address is held (and data for write access) after the command deassertion (NWE, NOE), during NAND flash read or write accesses to the attribute memory space:

0000 0000: 1 * fmc_ker_ck cycle

0000 0001: 2 * fmc_ker_ck cycle

.....

1111 1111: 256 * fmc_ker_ck cycles.

Bits 15:8 ATTWAIT[7:0]: Attribute memory wait time

These bits define the minimum number of x fmc_ker_ck (+1) clock cycles to assert the command (NWE, NOE), during NAND flash read or write accesses to the attribute memory space. The duration of command assertion is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value of fmc_ker_ck:

0000 0000: 1 * fmc_ker_ck cycle (+ wait cycle introduced by deassertion of NWAIT)

0000 0001: 2 * fmc_ker_ck cycles (+ wait cycle introduced by deassertion of NWAIT)

.....

1111 1111: 256 * fmc_ker_ck cycles (+ wait cycle introduced by deasserting NWAIT)

Bits 7:0 ATTSET[7:0]: Attribute memory setup time

These bits define the number of fmc_ker_ck clock cycles (+1) for address set up before the command assertion (NWE, NOE), during NAND flash read or write accesses to the attribute memory space:

0000 0000: 1 * fmc_ker_ck cycle

0000 0001: 2 * fmc_ker_ck cycle

.....

1111 1111: 256 * fmc_ker_ck cycles.

FMC Hamming parity result registers (FMC_HPR)

Address offset: 0x90

Reset value: 0x0000 0000

This register is used during read accesses in conjunction with the FMC sequencer. It contains the current error correction code value computed by the FMC NAND controller Hamming module. When the FMC sequencer reads data from a NAND flash memory page at the correct address, the data read are automatically processed by the Hamming computation module. When X bytes have been read (according to the sector size ECCSS field in the FMC_PCR register), the CPU must read the computed ECC value from the FMC_HECCR register. It then verifies if these computed parity data are the same as the parity value recorded in the spare area and stored in the and the FMC_HPR, to determine whether a page is valid, and to correct it otherwise. The FMC_HPR register must be cleared after being read by setting the ECCEN bit to 0. To compute a new data block, the ECCEN bit must be set.

31302928272625242322212019181716
HPR[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
HPR[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 HPR[31:0]: Hamming parity result

This field contains the parity value computed by the Hamming ECC computation module.

Table 259 describes the contents of these bitfields.

Table 259. HPR relevant bits

ECCSS[2:0]Sector size in bytesHPR bits
000256HPR[21:0]
001512HPR[23:0]
0101024HPR[25:0]
0112048HPR[27:0]
1004096HPR[29:0]
1018192HPR[31:0]

FMC Hamming code ECC result register (FMC_HECCR)

Address offset: 0x94

Reset value: 0x0000 0000

This register contain the current error correction code value computed by the FMC NAND controller Hamming module. When the CPU reads/writes data from/to a NAND flash memory page at the correct address (refer to Section 32.11.6: NAND ECC controller), the data read/written from/to the NAND flash memory are automatically processed by the Hamming computation module. When X bytes have been read (according to the sector size ECCSS

field in the FMC_PCR register), the CPU must read the computed ECC value from the FMC_HECCR register. It then verifies if these computed parity data are the same as the parity value recorded in the spare area, to determine whether a page is valid, and to correct it otherwise. The FMC_HECCR register must be cleared after being read by setting the ECCEN bit to 0. To compute a new data block, the ECCEN bit must be set.

31302928272625242322212019181716
HECC[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
HECC[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 HECC[31:0]: ECC result

This field contains the value computed by the Hamming ECC computation logic. Table 260 describes the contents of these bitfields.

Table 260. ECC result relevant bits(1)

ECCSS[2:0]Sector size in bytesHECC bits
000256HECC[21:0]
001512HECC[23:0]
0101024HECC[25:0]
0112048HECC[27:0]
1004096HECC[29:0]
1018192HECC[31:0]

1. Only the relevant bits according to the sector size are valid.

FMC NAND interrupt enable register (FMC_IER)

Address offset: 0x180

Reset value: 0x0000 0000

This register configures the interrupt capability generation when the RNB signal is connected on FMC interrupt pin. An interrupt can be generated on the rising edge, falling edge or high level detected on the RNB signal.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IFEEIHLEIREE
rwrwrw

Bits 31:3 Reserved, must be kept at reset value.

Bit 2 IFEE: Interrupt falling edge detection enable bit

Bit 1 IHLE: Interrupt high-level detection enable bit

Bit 0 IREE: Interrupt rising edge detection enable bit

FMC interrupt status register (FMC_ISR)

Address offset: 0x184

Reset value: 0x0000 0000

column_1column_2column_3column_4column_5column_6column_7column_8column_9column_10column_11column_12column_13column_14column_15column_16
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IFEFIHLFIREF
Res.Res.rrr
Res.Res.Bit 2 IFEF:Interrupt falling edge flag
Res.Res.Bit 1 IHLF:Interrupt high-level flag
Res.Res.Bit 0 IREF:Interrupt rising edge flag
Res.Res.RM0506 Rev 21705/4831

Bits 31:3 Reserved, must be kept at reset value.

Bit 2 IFEF: Interrupt falling edge flag

Bit 1 IHLF: Interrupt high-level flag

Bit 0 IREF: Interrupt rising edge flag

FMC NAND controller interrupt clear register (FMC_ICR)

Address offset: 0x188

Reset value: 0x0000 0000

Writing 1 in one of these bits clears the corresponding flag in the interrupt status register (FMC_ISR).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CIFEFCIHLFCIREF
www

Bits 31:3 Reserved, must be kept at reset value.

Bit 2 CIFEF : Clear Interrupt falling edge flag

0: No effect

1: Clears the IFEF flag in the FMC_ISR register

Bit 1 CIHLF : Clear Interrupt high-level flag

0: No effect

1: Clears the IHLF flag in the FMC_ISR register

Bit 0 CIREF : Clear Interrupt rising edge flag

0: No effect

1: Clear the IREF flag in the FMC_ISR register

FMC NAND command sequencer control register (FMC_CSQCR)

Address offset: 0x200

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CSQSTART
w

Bits 31:1 Reserved, must be kept at reset value.

Bit 0 CSQSTART : Command Sequencer Enable

Writing 1 starts the Command sequencer.

Writing 0 has no effect.

Note: Write this bit to 1 to start the sequencer only when the FMC is enabled by setting FMCEN bit of FMC_CFGR to 1 and the NAND flash controller is activated by setting PBKEN bit of FMC_PCR to 1.

FMC NAND command sequencer configuration register 1 (FMC_CSQCFGR1)

Address offset: 0x204

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.CMD2TCMD1TCMD2[7:0]
rwrwrwrwrwrwrwrwrwrw
1514131211109876543210
CMD1[7:0]Res.ACYNBR[2:0]Res.DMADENCMD2ENRes.
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:26 Reserved, must be kept at reset value.

Bit 25 CMD2T: Command 2 Sequencer timings

This bit specifies if the Command 2 (CMD2) is issued to the NAND flash memory with the timings defined in FMC_PMEM or FMC_PATT register.

Bit 24 CMD1T: Command 1 Sequencer timings

This bit specifies if the Command 1 (CMD1) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

Bits 23:16 CMD2[7:0]: Command 2 sequencer

These bits specify if the Command 2 is issued by the command sequencer for the command second cycle during read operations. This command is only issued when the CMD2EN bit is set.

Example: CMD2[7:0] bits must be programmed to 0x30 to issue the read column command.

Bits 15:8 CMD1[7:0]: Command 1 sequencer

These bits specify if the Command 1 is issued by the command sequencer for the first cycle during read or write operations.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 ACYNBR[2:0]: Address Cycle number

These bits define the number of address cycles to be generated by the command sequencer when issuing the command programmed in the registers.

Bit 3 Reserved, must be kept at reset value.

Bit 2 DMADEN: Command sequencer DMA request data enable

When this bit is set, the command sequencer generates a DMA request to the first DMA channel, to transfer data from/to NAND flash memory.

Bit 1 CMD2EN: Command cycle 2 Enable

This bit specifies that the command cycle 2 has to be generated by the command sequencer.

Bit 0 Reserved, must be kept at reset value.

FMC NAND command sequencer configuration register 2 (FMC_CSQCFGR2)

Address offset:0x208

Reset value: 0x0000 0000

This register is used to configure the command sequencer to issue random read/ write commands to read/ write data by sector and automatically read/write data from NAND flash memory at a programmable address offset. This is useful when performing a sector read/write operation followed by an ECC read/write operation in the NAND flash spare area.The command sequencer generates the random commands until all the sectors are read/written.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.RCMD2TRCMD1TRCMD2[7:0]
rwrwrwrwrwrwrwrwrwrw
1514131211109876543210
RCMD1[7:0]Res.Res.Res.Res.Res.DMASENRCMD2ENSQSDTEN
rwrwrwrwrwrwrwrwrwrwrw

Bits 31:26 Reserved, must be kept at reset value.

Bit 25 RCMD2T: Command 1 sequencer timings

This bit specifies if the CMD1 is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

Bit 24 RCMD1T: Command 1 sequencer timings

This bit specifies if the CMD1 is issued to the NAND flash memory with the timings flash memory in FMC_PMEM or FMC_PATT register.

Bits 23:16 RCMD2[7:0]: Random Command 2 sequencer

These bits specify that the command 2 is issued by the command sequencer for the second cycle during read operations. This command is only issued when the RCMD2EN bit is set.
Example: the RCMD2 (0xE0) is required to issue the random read column command.

Bits 15:8 RCMD1[7:0]: Random Command 1 sequencer

These bits specify that the command 1 value is issued by the command sequencer for the first cycle during read or write accesses.

Bits 7:3 Reserved, must be kept at reset value.

Bit 2 DMASEN: Command sequencer DMA request decoding status enable

When this bit is set, the command sequencer generates a DMA request to the second DMA channel when valid bits are available in the ECC status register at the end of ECC processing (decoding).

0: No DMA request used for ECC status registers transfer

1: A DMA request used for ECC status registers transfer

Note: This bit must be set only during a page read sequence to offload the saving of the ECC results between sectors by using a second DMA channel.

Bit 1 RCMD2EN: Random Command 2 sequencer enable

This bit enables the command 2 to be issued by the command sequencer during read accesses. This command is issued only when the CMD2SQEN bit is set.

0: Command 2 not issued.

1: Command 2 (CMD2SQ[7:0]) issued by the command sequencer to NAND flash memory after the address cycle.

Bit 0 SQSDTEN: Sequencer spare data transfer enable

This bit enables the sequencer to access the spare data area after each sector transfer. It also enables the ECC when using the sequencer. ECCEN bit in FMC_PCR register must be reset.

0: ECC disabled and spare data area not accessed by the sequencer

1: ECC enabled and spare data area read or programmed by the sequencer after each sector transfer

FMC NAND sequencer configuration register 3 (FMC_CSQCFGR3)

Address offset: 0x20C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.RAC2TRAC1TSDTAC5TAC4TAC3TAC2TAC1T
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.SNBR[5:0]Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw

Bits 31:24 Reserved, must be kept at reset value.

Bit 23 RAC2T: Random Address cycle 2 sequencer timings

This bit specifies if the random Address cycle 2 (ADDC2) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or in FMC_PATT register.

0: Random ADDC2 issued with the timings programmed in FMC_PMEM

1: Random ADDC2 issued with the timings programmed in FMC_PATT

Bit 22 RAC1T: Random Address cycle 1 sequencer timings

This bit specifies if the random Address cycle 1 (ADDC1) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or in FMC_PATT register.

0: Random ADDC1 issued with the timings programmed in FMC_PMEM

1: Random ADDC1 issued with the timings programmed in FMC_PATT

Bit 21 SDT: Spare data transfer sequencer timings

This bit specifies if the spare data transfer for read and write operations from/to the NAND flash memory are performed with the timings programmed in FMC_PMEM or FMC_PATT register.

0: Spare data transfer issued with the timings programmed in FMC_PMEM

1: Spare data transfer issued with the timings programmed in FMC_PATT

Bit 20 AC5T: Address cycle 5 sequencer timings

This bit defines if the Address cycle 5(ADDC1) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

0: ADDC5 issued with the timings programmed in FMC_PMEM

1: ADDC5 issued with the timings programmed in FMC_PATT

Bit 19 AC4T: Address cycle 4sequencer timings

This bit defines if the Address cycle 4 (ADDC4) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

0: ADDC4 issued with the timings programmed in FMC_PMEM

1: ADDC4 issued with the timings programmed in FMC_PATT

Bit 18 AC3T: Address cycle 3 sequencer timings

This bit defines if the Address cycle 3 (ADDC3) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

0: ADDC3 issued with the timings programmed in FMC_PMEM

1: ADDC3 issued with the timings programmed in FMC_PATT

Bit 17 AC2T: Address cycle 2 sequencer timings

This bit defines if the Address cycle 2 (ADDC2) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

0: ADDC2 issued with the timings programmed in FMC_PMEM

1: ADDC2 issued with the timings programmed in FMC_PATT

Bit 16 AC1T: Address cycle 1 sequencer timings

This bit defines if the Address cycle 1 (ADDC1) is issued to the NAND flash memory with the timings programmed in FMC_PMEM or FMC_PATT register.

0: ADDC1 issued with the timings programmed in FMC_PMEM

1: ADDC1 issued with the timings programmed in FMC_PATT

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:8 SNBR[5:0]: Number of sectors to be read/written

These bits define the number of sectors that are processed by the sequencer.

They are used to read/write part of a page or to use the ECC (in particular with the BCH code which requires 512-byte sectors):

000000: 1 sector

000001: 2 sectors

...

111111: 16 sectors

Others: Reserved.

Bits 7:0 Reserved, must be kept at reset value.

FMC NAND command sequencer address register 1 (FMC_CSQR1)

Address offset: 0x210

Reset value: 0x0000 0000

This register is used to define the value of address cycles 1 to 4 to be issued by the command sequencer.

31302928272625242322212019181716
ADDC4[7:0]ADDC3[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
ADDC2[7:0]ADDC1[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 ADDC4[7:0]: Address Cycle 4

These bits define the value of address cycle 4 to be issued by the command sequencer during read or write accesses.

Bits 23:16 ADDC3[7:0]: Address Cycle 3

These bits define the value of address cycle 2 to be issued by the command sequencer during read or write accesses.

Bits 15:8 ADDC2[7:0]: Address Cycle 2

These bits define the value of address cycle 2 to be issued by the command sequencer during read or write accesses.

Bits 7:0 ADDC1[7:0]: Address Cycle 1

These bits define the value of address cycle 1 to be issued by the command sequencer during read or write accesses.

FMC NAND command sequencer address register 2 (FMC_CSQAR2)

Address offset: 0x214

Reset value: 0x0000 0000

This register is used to program the fifth address cycle and the address offset in spare area. It also selects the chip enable.

31302928272625242322212019181716
SAO[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.NAND
CEN1
NAND
CEN0
Res.Res.ADDC5[7:0]
rwrwrwrwrwrwrwrwrwrw

Bits 31:16 SAO[15:0]: Spare Area Address Offset

These bits define the offset of the first ECC byte in the spare area for the program sequence.

Note: The minimum SAQ value is 2 since the first two bytes of the spare area are reserved for Bad block marking and metadata.

Bits 15:12 Reserved, must be kept at reset value.

Bits 11:10 NANDCEN[1:0]: NAND flash chip enable number

These bits define the chip enable to be selected by the NAND flash command sequencer.

00: NCE1 chip enable selected

01: NCE2 chip enable selected

10: NCE3 chip enable selected

11: NCE4 chip enable selected

Bits 9:8 Reserved, must be kept at reset value.

Bits 7:0 ADDC5[7:0]: Address Cycle 5

These bits define the value of address cycle 5 to be issued by the command sequencer during read or write accesses.

FMC NAND command sequencer interrupt enable register (FMC_CSQIER)

Address offset: 0x220

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CMDTCIESUEIESEIESCIETCIE
rwrwrwrwrw

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 CMDTCIE: Command Transfer Complete interrupt enable

Bit 3 SUEIE: Sector Uncorrectable Error interrupt enable

Bit 2 SEIE: Sector Error interrupt enable

Bit 1 SCIE: Sector Complete interrupt enable

Bit 0 TCIE: Transfer Complete Interrupt enable

FMC NAND command sequencer interrupt status register (FMC_CSQISR)

Address offset: 0x224

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CMDTCFSUEFSEFSCFTCF
rwrwrwrwrw

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 CMDTCF: Command Transfer Complete flag

This bit is set when the command sequencer has completed the transfer of programmed commands and addresses.

This bit is cleared by setting CCMDTCF bit. An interrupt can be generated if the CMDTCIE bit is set in the FMC_CSQICR register.

Note: The Sector Transfer Complete interrupt is not needed in sequencer mode.

Bit 3 SUEF: Sector Uncorrectable Error flag

This bit is set by hardware and cleared by writing 1 to the CSUEF bit in FMC_CSQICR.

When this bit is set, it indicates that the command sequencer detected an uncorrectable error when decoding a sector. An interrupt can be generated if the SUEIE bit is set in the FMC_CSQICR register.

Note: The SUEF bit is relevant only for BCH code to indicate uncorrectable errors. It must be ignored for Hamming code.

Bit 2 SEF: Sector Error flag

This bit is set by hardware and cleared by writing 1 to the CSEF bit in FMC_CSQICR.

This bit is set when the command sequencer has completed the sector data transfer with at least one error detection. An interrupt can be generated if the SEIE bit is set in the FMC_CSQICR register.

Note: The SEF bit is relevant only for BCH code to indicate that errors are present. It must be ignored for Hamming code.

Bit 1 SCF: Sector Complete flag

This bit is set by hardware and cleared by writing 1 to the CSCF bit in FMC_CSQICR.

This bit is set when the command sequencer has completed the sector data transfer. An interrupt can be generated if the SCIE bit is set in the FMC_CSQICR register.

Bit 0 TCF: Transfer Complete flag

This bit is set by hardware and cleared by writing 1 to the CTCF bit in FMC_CSQICR.

This bit is set when the command sequencer has transferred all the data for all sectors or when the command sequencer was aborted. An interrupt can be generated if the TCIE bit is set in the FMC_CSQICR register.

FMC NAND command sequencer interrupt clear register (FMC_CSQICR)

Address offset: 0x228

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CCMDTCFCSUEFCSEFCSCFCTCF
wwwww

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 CCMDTCF: Clear Command Transfer Complete flag

Writing one clears the CMTCF flag in the FMC_CSQISR register

Bit 3 CSUEF: Clear Sector uncorrectable Error flag

Writing one clears the SUEF flag in the FMC_CSQISR register

Bit 2 CSEF: Clear Sector Error flag

Writing one clears the SEF flag in the FMC_CSQISR register

Bit 1 CSCF: Clear Sector Complete flag

Writing one clears the SCF flag in the FMC_CSQISR register

Bit 0 CTCF: Clear Transfer Complete flag

Writing one clears the TCF flag in the FMC_CSQISR register

FMC command sequencer error mapping status register (FMC_CSQEMSR)

Address offset: 0x230

Reset value: 0x0000 0000

This register holds a sector error mapping status when the whole transfer is complete.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
SEM[15:0]
rrrrrrrrrrrrrrrr

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 SEM[15:0] : Sector Error mapping

When SEM[i] bit (0 ≤ i ≤ 15) is set, at least one error has been detected on sector i+1.

As an example, SEM[2] and SEM[1] bits are set when errors are detected in sector 3 and 2.

FMC BCH interrupt enable register (FMC_BCHIER)

Address offset: 0x250

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EPBRIEDSRIEDEFIEDERIEDUEIE
rwrwrwrwrw

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 EPBRIE : Decoder Parity Bits Ready Interrupt enable

0: Decoder Parity Bits Ready Interrupt disable

1: Decoder Parity Bits Ready Interrupt enable

Bit 3 DSRIE : Decoder Syndrome Ready Interrupt enable

0: Decoder Syndrome Ready Interrupt disable

1: Decoder Syndrome Ready Interrupt enable

FMC BCH interrupt and status register (FMC_BCHISR)

Address offset: 0x254

Reset value: 0x0000 0000

This register holds the status of BCH encoder/decoder after processing each sector. When the sequencer is used, this register is automatically cleared and the corresponding interrupt must not be enabled through FMC_BCHIER register.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EPBRFDSRFDEFFDERFDUEF
rrrrr

Bits 31:5 Reserved, must be kept at reset value.

FMC BCH interrupt clear register (FMC_BCHICR)

Address offset: 0x258

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CEPBRFCDSRFCDEFFCDERFCDUEF
wwwww

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 CEPBRF : Clear Encoder Parity Bits Ready flag

Writing 1 clears the EPBRF flag in FMC_BCHISR.

Bit 3 CDSRF : Clear Decoder Syndrome Ready flag

Writing 1 clears the DSRF flag in FMC_BCHISR.

Bit 2 CDEFF : Clear Decoder Error Found flag

Writing 1 clears the DEFF flag in FMC_BCHISR.

Bit 1 CDERF : Clear Decoder Error ready flag

Writing 1 clears the DERF flag in FMC_BCHISR.

Bit 0 CDUEF : Clear Decoder Uncorrectable Error flag

Writing 1 clears the DUEF flag in FMC_BCHISR.

FMC BCH parity bits register 1 (FMC_BCHPBR1)

Address offset: 0x260

Reset value: 0x0000 0000

These registers contain the BCH parity bits (BCHPB). For the BCH 4-bit, only BCHPB[51:0] are significant and for the BCH 8-bit BCHPB[103:0] are significant.

31302928272625242322212019181716
BCHPB[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
BCHPB[15:0]
rrrrrrrrrrrrrrrr
Bits 31:0 BCHPB[31:0] : BCH parity bits

FMC BCH parity bits register 2 (FMC_BCHPBR2)

Address offset: 0x264

Reset value: 0x0000 0000

31302928272625242322212019181716
BCHPB[63:48]
rrrrrrrrrrrrrrrr
1514131211109876543210
BCHPB[47:32]
rrrrrrrrrrrrrrrr
Bits 31:0 BCHPB[63:32] : BCH parity bits

FMC BCH parity bits register 3 (FMC_BCHPBR3)

Address offset: 0x268

Reset value: 0x0000 0000

31302928272625242322212019181716
BCHPB[95:80]
rrrrrrrrrrrrrrrr
1514131211109876543210
BCHPB[79:64]
rrrrrrrrrrrrrrrr
Bits 31:0 BCHPB[95:64] : BCH parity bits

FMC BCH parity bits register 4 (FMC_BCHPBR4)

Address offset: 0x26C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.BCHPB[103:96]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 BCHPB[103:96] : BCH parity bits

FMC BCH decoder status register 0 (FMC_BCHDSR0)

Address offset: 0x27C

Reset value: 0x0000 0000

This register contains some fields already available in other registers but that require to be saved when error correction is performed on several sectors at a time (for example a whole NAND flash page). This allows a DMA channel to transfer the content of FMC_BCHDSR0 to 4 to a decoding status buffer.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.DEN[3:0]Res.Res.DEFDUE
rrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 DEN[3:0]: Decoder error number

When DEF bit is set, this field indicates the number of errors detected by the BCH decoder.

Following the selected BCH code, if the number of detected errors exceeds the number of correctable errors, this bit is not significant and DUE bit is set.

If the BCH decoder detects a number of errors that exceeds the maximum number of detectable errors, DEN is not significant.

Bits 3:2 Reserved, must be kept at reset value.

Bit 1 DEF: Decoder error found

This field indicates that the decoder has finished searching errors and identifying their location.

The number of errors and their location are available in FMC_BCHDSR0 and FMC_BCHDSR1 to 4, respectively.

Bit 0 DUE: Decoder uncorrectable error

This field indicates that too many errors have been detected in the sector during the BCH decoding and that the sector is uncorrectable.

If the BCH decoder detects a number of errors that exceeds the maximum number of detectable errors, DUE is not significant.

FMC BCH decoder status register for memory region 1 (FMC_BCHDSR1)

Address offset: 0x280

Reset value: 0x0000 0000

The maximum error correction capability of the BCH block embedded in the FMC is 8 errors. This register contains the positions of the 1st and 2nd error bits in EBP1 and EPB2 fields, respectively. If less than 8 errors are detected, the useless EPBx fields (x = 1 to 8) are “don’t care”.

31302928272625242322212019181716
Res.Res.Res.EBP2[12:0]
rrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.EBP1[12:0]
rrrrrrrrrrrrr

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:16 EBP2[12:0] : Error bit position for error number 2

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:0 EBP1[12:0] : Error bit position for error number 1

FMC BCH decoder status register for memory region 2 (FMC_BCHDSR2)

Address offset: 0x284

Reset value: 0x0000 0000

The maximum error correction capability of the BCH block embedded in the FMC is 8 errors. This register contains the positions of the 3rd and 4th error bits in EBP3 and EPB4 fields, respectively. If less than 8 errors are detected, the useless EPBx fields (x = 1 to 8) are don’t care.

31302928272625242322212019181716
Res.Res.Res.EBP4[12:0]
rrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.EBP3[12:0]
rrrrrrrrrrrrr

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:16 EBP4[12:0] : Error bit position for error number 4

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:0 EBP3[12:0] : Error bit position for error number 3

FMC BCH decoder status register for memory region 3 (FMC_BCHDSR3)

Address offset: 0x288

Reset value: 0x0000 0000

The maximum error correction capability of the BCH block embedded in the FMC is 8 errors. This register contains the positions of the 5th and 6th error bits in EBP5 and EPB6 fields, respectively. If less than 8 errors are detected, the useless EPBx fields (x = 1 to 8) are don't care.

31302928272625242322212019181716
Res.Res.Res.EBP6[12:0]
rrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.EBP5[12:0]
rrrrrrrrrrrrr

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:16 EBP6[12:0]: Error bit position for error number 6

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:0 EBP5[12:0]: Error bit position for error number 5

FMC BCH decoder status register for memory region 4 (FMC_BCHDSR4)

Address offset: 0x28C

Reset value: 0x0000 0000

The maximum error correction capability of the BCH block embedded in the FMC is 8 errors. This register contains the positions of the 7th and 8th error bits in EBP7 and EPB8 fields, respectively. If less than 8 errors are detected, the useless EPBx fields (x = 1 to 8) are don't care.

31302928272625242322212019181716
Res.Res.Res.EBP8[12:0]
rrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.EBP7[12:0]
rrrrrrrrrrrrr

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:16 EBP8[12:0]: Error bit position for error number 8

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:0 EBP7[12:0]: Error bit position for error number 7

32.12 FMC register map

Table 261. FMC register map

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x00FMC_BCR1Res.Res.Res.Res.Res.Res.Res.Res.NBLSET[1:0]CSCOUNT1CSCOUNT0CBURSTRWCPSize[2:0]ASYNCAWAITEXTMODWAITENWRENWAITCFGRes.WAITPOLBURSTENRes.MWID[1:0]MTYP[1:0]MUXENMBKEN
Reset value0 00000 0 00 000000110 11 01 1
0x08FMC_BCR2Res.Res.Res.Res.Res.Res.Res.Res.NBLSET[1:0]CSCOUNT1CSCOUNT0CBURSTRWCPSize[2:0]ASYNCAWAITEXTMODWAITENWRENWAITCFGRes.WAITPOLBURSTENRes.MWID[1:0]MTYP[1:0]MUXENMBKEN
Reset value0 00000 0 00 000000110 10 01 1
0x10FMC_BCR3Res.Res.Res.Res.Res.Res.Res.Res.NBLSET[1:0]CSCOUNT1CSCOUNT0CBURSTRWCPSize[2:0]ASYNCAWAITEXTMODWAITENWRENWAITCFGRes.WAITPOLBURSTENRes.MWID[1:0]MTYP[1:0]MUXENMBKEN
Reset value0 00000 0 00 000000110 10 01 1
0x18FMC_BCR4Res.Res.Res.Res.Res.Res.Res.Res.NBLSET[1:0]CSCOUNT1CSCOUNT0CBURSTRWCPSize[2:0]ASYNCAWAITEXTMODWAITENWRENWAITCFGRes.WAITPOLBURSTENRes.MWID[1:0]MTYP[1:0]MUXENMBKEN
Reset value00 00000 0 00 000000110 10 01 1
0x04FMC_BTR1DATAHLDACCMODDATLATCLKDIV[3:0]BUSTURNDATASTADDHLDADDSET
Reset value0000111111111111111111111111111
0x0CFMC_BTR2DATAHLDACCMODDATLATCLKDIV[3:0]BUSTURNDATASTADDHLDADDSET
Reset value0000111111111111111111111111111
0x14FMC_BTR3DATAHLDACCMODDATLATCLKDIV[3:0]BUSTURNDATASTADDHLDADDSET
Reset value0000111111111111111111111111111
0x1CFMC_BTR4DATAHLDACCMODDATLATCLKDIV[3:0]BUSTURNDATASTADDHLDADDSET
Reset value0000111111111111111111111111111
0x20FMC_CFGRFMCERes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CCLKENCLKDIV[3:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00 00 0 0 0
0x80FMC_PCRRes.Res.Res.Res.Res.Res.WENBCHECCRes.Res.Res.Res.ECCSS[2:0]TAR[3:0]TCLR[3:0]ECCALGRes.ECCENPWIDRes.PBKENPWAITENRes.
Reset value000 1 11 1 11 1 1000 000
0x84FMC_SRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.NWRFPEFRes.Res.Res.Res.SOSTRes.
Reset value1111
0x88FMC_PMEMMEMHIZMEMHOLDMEMWAITMEMSET
Reset value00001010000010100000101000001010

Table 261. FMC register map (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x8CFMC_PATTATTHIZATTHOLDATTWAITATTSET
Reset value00001010000010100000101000001010
0x90FMC_HPRHPR[31:0]
Reset value00000000000000000000000000000000
0x94FMC_HECCRHECC[[31:0]
Reset value00000000000000000000000000000000
0x98ReservedReserved
0x104FMC_BWTR1Res.DATAHLDACCMODRes.Res.Res.Res.Res.Res.Res.Res.BUSTURNDATASTADDHLDADDSET
Reset value11111111111111111111
0x10CFMC_BWTR2Res.DATAHLDACCMODRes.Res.Res.Res.Res.Res.Res.Res.BUSTURNDATASTADDHLDADDSET
Reset value11111111111111111111
0x114FMC_BWTR3Res.DATAHLDACCMODRes.Res.Res.Res.Res.Res.Res.Res.BUSTURNDATASTADDHLDADDSET
Reset value11111111111111111111
0x11CFMC_BWTR4Res.DATAHLDACCMODRes.Res.Res.Res.Res.Res.Res.Res.BUSTURNDATASTADDHLDADDSET
Reset value11111111111111111111
0x180FMC_IERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IFEEIHLEIREE
Reset value000
0x184FMC_ISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IFEFIHLFIREF
Reset value000
0x188FMC_ICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CIFEFCIHLFCIREF
Reset value000
0x200FMC_CSQCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CSQSTART
Reset value0
0x204FMC_CSQCFGR1Res.Res.Res.Res.Res.Res.CMD2TCMD1TCMD2CMD1ACYNBRRes.DMADENCMD2ENRes.
Reset value000000000000000000000000
0x208FMC_CSQCFGR2Res.Res.Res.Res.Res.Res.RCMD2TRCMD1TRCMD2RCMD1Res.Res.Res.Res.Res.DMADENRCMD2ENSQSDTEN
Reset value000000000000000000000
0x20CFMC_CSQCFGR3Res.Res.Res.Res.Res.Res.Res.Res.RAC2TRAC1TSDTAC5TAC4TAC3TAC2TAC1TRes.Res.SNBRRes.Res.Res.Res.Res.Res.
Reset value0000000000000000
0x210FMC_CSQAR1ADDC4ADDC3ADDC2ADDC1
Reset value00000000000000000000000000000000

Table 261. FMC register map (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x214FMC_CSQAR2SAORes.Res.Res.Res.NANDCEN1NANDCEN0Res.Res.ADDC5
Reset value00000000000000100000000000
0x220FMC_CSQIERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CMDTCIESUEIESEIESCIETCIE
Reset value00000
0x224FMC_CSQISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CMDTCFSUEFSEFSCFTCF
Reset value00000
0x228FMC_CSQICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CCMDTCFCSUEFCSEFCSCFCTCF
Reset value00000
0x22CReservedReserved
0x230FMC_CSQEMSRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEM[15:0]
Reset value0000000000000000
0x240ReservedReserved
0x250FMC_BCHIERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EPBRIEDSRIEDEFIEDERIEDUEIE
Reset value00000
0x254FMC_BCHISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EPBRFDSRFDEFFDERFDUEF
Reset value00000
0x258FMC_BCHICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CEPBRFCDSRFCDEFFCDERFCDUEF
Reset value00000
0x260FMC_BCHPBR1BCHPB[31:0]
Reset value00000000000000000000000000000000
0x264FMC_BCHPBR2BCHPB[63:32]
Reset value00000000000000000000000000000000
0x268FMC_BCHPBR3BCHPB[95:64]
Reset value00000000000000000000000000000000
0x26CFMC_BCHPBR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.BCHPB[103:96]
Reset value00000000
0x27CFMC_BCHDSR0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DENRes.Res.DEFDUE
Reset value000000
0x280FMC_BCHDSR1Res.Res.Res.EBP2[12:0]Res.Res.Res.EBP1[12:0]
Reset value00000000000000000000000000
0x284FMC_BCHDSR2Res.Res.Res.EBP4[12:0]Res.Res.Res.EBP3[12:0]
Reset value00000000000000000000000000
0x288FMC_BCHDSR3Res.Res.Res.EBP6[12:0]Res.Res.Res.EBP5[12:0]
Reset value
0x28CFMC_BCHDSR4Res.Res.Res.EBP8[12:0]Res.Res.Res.EBP7[12:0]
Reset value

Table 261. FMC register map (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x300FMC_SECCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEC5SEC4SEC3SEC2SEC1SEC0
Reset value
0x304FMC_PRIVCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PRIV5PRIV4PRIV3PRIV2PRIV1PRIV0
Reset value
0x308FMC_CIDCFGR_LOCKRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LOCK5LOCK4LOCK3LOCK2LOCK1LOCK0
Reset value
0x30CFMC_CIDCFGR0Res.Res.Res.Res.Res.Res.Res.Res.SEMWL C6SEMWL C6SEMWL C5SEMWL C4SEMWL C3SEMWL C2SEMWL C1SEMWL C0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]SCID[2:0]Res.Res.SEMENCFEN
Reset value0000000000000
0x310FMC_SEMCR0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]SEMCID[2:0]Res.Res.Res.SEM_MUTEX
Reset value0000
0x314FMC_CIDCFGR1Res.Res.Res.Res.Res.Res.Res.Res.SEMWL C7SEMWL C6SEMWL C5SEMWL C4SEMWL C3SEMWL C2SEMWL C1SEMWL C0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]SCID[2:0]Res.Res.SEMENCFEN
Reset value0000000000000
0x318FMC_SEMCR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]SEMCID[2:0]Res.Res.Res.SEM_MUTEX
Reset value0000
0x31CFMC_CIDCFGR2Res.Res.Res.Res.Res.Res.Res.Res.SEMWL C7SEMWL C6SEMWL C5SEMWL C4SEMWL C3SEMWL C2SEMWL C1SEMWL C0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]SCID[2:0]Res.Res.SEMENCFEN
Reset value0000000000000
0x320FMC_SEMCR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]SEMCID[2:0]Res.Res.Res.SEM_MUTEX
Reset value0000
0x324FMC_CIDCFGR3Res.Res.Res.Res.Res.Res.Res.Res.SEMWL C7SEMWL C6SEMWL C5SEMWL C4SEMWL C3SEMWL C2SEMWL C1SEMWL C0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]SCID[2:0]Res.Res.SEMENCFEN
Reset value0000000000000
0x328FMC_SEMCR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]SEMCID[2:0]Res.Res.Res.SEM_MUTEX
Reset value0000
0x32CFMC_CIDCFGR4Res.Res.Res.Res.Res.Res.Res.Res.SEMWL C7SEMWL C6SEMWL C5SEMWL C4SEMWL C3SEMWL C2SEMWL C1SEMWL C0Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]SCID[2:0]Res.Res.SEMENCFEN
Reset value0000000000000

Table 261. FMC register map (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x330FMC_SEMCR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]Res.Res.Res.SEM_MUTEX
Reset value0000
0x334FMC_CIDCFGR5Res.Res.Res.Res.Res.Res.Res.Res.SEMWLC7SEMWLC6SEMWLC5SEMWLC4SEMWLC3SEMWLC2SEMWLC1SEMWLC0Res.Res.Res.Res.Res.Res.Res.Res.Res.SCID[2:0]Res.Res.SEMENCFEN
Reset value0000000000000
0x338FMC_SEMCR5Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEMCID[2:0]Res.Res.Res.SEM_MUTEX
Reset value0000
0x3E8FMC_HWCFGR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CID_WIDTH
[3:0]
MAX_CID
[3:0]
Reset value0x0000 0037
0x3ECFMC_HWCFGR2Res.Res.Res.SECURERes.Res.Res.PRIVILEGESDRAM2_BASE
[3:0]
SDRAM1_BASE
[3:0]
NAND_BASE
[3:0]
SDRAM_RBASE
[3:0]
NOR_BASE
[3:0]
RD_LN2PTH
[3:0]
Reset value0x11DC 4772
0x3F0FMC_HWCFGR1RA_LN2DPTH
[3:0]
WR_LN2DPTH
[3:0]
WD_LN2DPTH
[3:0]
WA_LN2DPTH
[3:0]
ID_SIZE[3:0]Res.Res.Res.SDRAM_SELRes.Res.Res.NAND_ECCRes.Res.Res.NAND_SEL
Reset value0x2232 9011
0x3F4FMC_VERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
Reset value0x0000 0020
0x3F8FMC_IPIDRID[31:0]
Reset value00000000000101000000000000000010
0x3FCFMC_SIDRSID[31:0]
Reset value10100011110001011101110100000001

Refer to Section 2.4: Memory organization for the register boundary addresses.