stm32-data/data/registers/fmc_v4.yaml
2024-02-24 16:54:06 +08:00

470 lines
26 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

block/FMC:
description: Flexible memory controller.
items:
- name: BCR1
description: SRAM/NOR-Flash chip-select control register for bank 1.
byte_offset: 0
fieldset: BCR1
- name: BTR
description: SRAM/NOR-Flash chip-select timing register for bank 1.
array:
len: 4
stride: 8
byte_offset: 4
fieldset: BTR
- name: BCR
description: SRAM/NOR-Flash chip-select control register for bank 2.
array:
len: 3
stride: 8
byte_offset: 8
fieldset: BCR
- name: PCSCNTR
description: PSRAM chip select counter register.
byte_offset: 32
fieldset: PCSCNTR
- name: PCR
description: NAND Flash control registers.
byte_offset: 128
fieldset: PCR
- name: SR
description: FIFO status and interrupt register.
byte_offset: 132
fieldset: SR
- name: PMEM
description: Common memory space timing register.
byte_offset: 136
fieldset: PMEM
- name: PATT
description: Attribute memory space timing register.
byte_offset: 140
fieldset: PATT
- name: ECCR
description: ECC result registers.
byte_offset: 148
- name: BWTR
description: SRAM/NOR-Flash write timing registers 1.
array:
len: 4
stride: 8
byte_offset: 260
fieldset: BWTR
- name: SDCR
description: SDRAM control registers 1.
array:
len: 2
stride: 4
byte_offset: 320
fieldset: SDCR
- name: SDTR
description: SDRAM timing registers 1.
array:
len: 2
stride: 4
byte_offset: 328
fieldset: SDTR
- name: SDCMR
description: SDRAM Command Mode register.
byte_offset: 336
fieldset: SDCMR
- name: SDRTR
description: SDRAM refresh timer register.
byte_offset: 340
fieldset: SDRTR
- name: SDSR
description: SDRAM status register.
byte_offset: 344
fieldset: SDSR
fieldset/BCR:
description: SRAM/NOR-Flash chip-select control register for bank 4.
fields:
- name: MBKEN
description: Memory bank enable bit Enables the memory bank. After reset Bank1 is enabled, all others are disabled. Accessing a disabled bank causes an ERROR on AHB bus.
bit_offset: 0
bit_size: 1
- name: MUXEN
description: 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:.
bit_offset: 1
bit_size: 1
- name: MTYP
description: Memory type Defines the type of external memory attached to the corresponding memory bank.
bit_offset: 2
bit_size: 2
- name: MWID
description: Memory data bus width Defines the external memory device width, valid for all type of memories.
bit_offset: 4
bit_size: 2
- name: FACCEN
description: Flash access enable Enables NOR Flash memory access operations.
bit_offset: 6
bit_size: 1
- name: BURSTEN
description: Burst enable bit This bit enables/disables synchronous accesses during read operations. It is valid only for synchronous memories operating in Burst mode.
bit_offset: 8
bit_size: 1
- name: WAITPOL
description: Wait signal polarity bit Defines the polarity of the wait signal from memory used for either in Synchronous or Asynchronous mode.
bit_offset: 9
bit_size: 1
- name: WAITCFG
description: 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_offset: 11
bit_size: 1
- name: WREN
description: Write enable bit This bit indicates whether write operations are enabled/disabled in the bank by the FMC.
bit_offset: 12
bit_size: 1
- name: WAITEN
description: Wait enable bit This bit enables/disables wait-state insertion via the NWAIT signal when accessing the memory in Synchronous mode.
bit_offset: 13
bit_size: 1
- name: EXTMOD
description: 'Extended mode enable This bit enables the FMC to program the write timings for non multiplexed 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: Mode 1 is the default mode when the SRAM/PSRAM memory type is selected (MTYP = 0x0 or 0x01) Mode 2 is the default mode when the NOR memory type is selected (MTYP = 0x10).'
bit_offset: 14
bit_size: 1
- name: ASYNCWAIT
description: Wait signal during asynchronous transfers This bit enables/disables the FMC to use the wait signal even during an asynchronous protocol.
bit_offset: 15
bit_size: 1
- name: CPSIZE
description: 'CRAM page size These are used for CellularRAM™ 1.5 which does not allow burst access to cross the address boundaries between pages. When these bits are configured, the FMC controller splits automatically the burst access when the memory page size is reached (refer to memory datasheet for page size). Others: reserved.'
bit_offset: 16
bit_size: 3
- name: CBURSTRW
description: Write burst enable For PSRAM (CRAM) operating in Burst mode, the bit enables synchronous accesses during write operations. The enable bit for synchronous read accesses is the BURSTEN bit in the FMC_BCRx register.
bit_offset: 19
bit_size: 1
- name: CCLKEN
description: 'Continuous clock enable This bit enables the FMC_CLK clock output to external memory devices. Note: The CCLKEN bit of the FMC_BCR2..4 registers is dont care. It is only enabled through the FMC_BCR1 register. Bank 1 must be configured in Synchronous mode to generate the FMC_CLK continuous clock. Note: If CCLKEN bit is set, the FMC_CLK clock ratio is specified by CLKDIV value in the FMC_BTR1 register. CLKDIV in FMC_BWTR1 is dont care. Note: If the Synchronous mode is used and CCLKEN bit is set, the synchronous memories connected to other banks than Bank 1 are clocked by the same clock (the CLKDIV value in the FMC_BTR2..4 and FMC_BWTR2..4 registers for other banks has no effect.).'
bit_offset: 20
bit_size: 1
- name: WFDIS
description: 'Write FIFO disable This bit disables the Write FIFO used by the FMC controller. Note: The WFDIS bit of the FMC_BCR2..4 registers is dont care. It is only enabled through the FMC_BCR1 register.'
bit_offset: 21
bit_size: 1
- name: NBLSET
description: Byte lane (NBL) setup These bits configure the NBL setup timing from NBLx low to chip select NEx low.
bit_offset: 22
bit_size: 2
- name: FMCEN
description: 'FMC controller enable This bit enables or disables the FMC controller. Note: The FMCEN bit of the FMC_BCR2..4 registers is dont care. It is only enabled through the FMC_BCR1 register.'
bit_offset: 31
bit_size: 1
fieldset/BCR1:
extends: BCR
description: SRAM/NOR-Flash chip-select control register for bank 1.
fields:
- name: CCLKEN
description: 'Continuous clock enable This bit enables the FMC_CLK clock output to external memory devices. Note: The CCLKEN bit of the FMC_BCR2..4 registers is dont care. It is only enabled through the FMC_BCR1 register. Bank 1 must be configured in Synchronous mode to generate the FMC_CLK continuous clock. Note: If CCLKEN bit is set, the FMC_CLK clock ratio is specified by CLKDIV value in the FMC_BTR1 register. CLKDIV in FMC_BWTR1 is dont care. Note: If the Synchronous mode is used and CCLKEN bit is set, the synchronous memories connected to other banks than Bank 1 are clocked by the same clock (the CLKDIV value in the FMC_BTR2..4 and FMC_BWTR2..4 registers for other banks has no effect.).'
bit_offset: 20
bit_size: 1
- name: WFDIS
description: 'Write FIFO disable This bit disables the Write FIFO used by the FMC controller. Note: The WFDIS bit of the FMC_BCR2..4 registers is dont care. It is only enabled through the FMC_BCR1 register.'
bit_offset: 21
bit_size: 1
fieldset/BTR:
extends: BWTR
description: SRAM/NOR-Flash chip-select timing register for bank 1.
fields:
- name: CLKDIV
description: 'Clock divide ratio (for FMC_CLK signal) Defines the period of FMC_CLK clock output signal, expressed in number of HCLK cycles: In asynchronous NOR Flash, SRAM or PSRAM accesses, this value is dont care. Note: Refer to Section 5.6.5: Synchronous transactions for FMC_CLK divider ratio formula).'
bit_offset: 20
bit_size: 4
- name: DATLAT
description: '(see note below bit descriptions): Data latency for synchronous memory For synchronous access with read/write Burst mode enabled (BURSTEN / CBURSTRW bits set), defines 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 HCLK periods, but in FMC_CLK periods. For asynchronous access, this value is don''t care.'
bit_offset: 24
bit_size: 4
- name: ACCMOD
description: Access mode Specifies 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.
bit_offset: 28
bit_size: 2
- name: DATAHLD
description: 'Data hold phase duration These bits are written by software to define the duration of the data hold phase in HCLK cycles (refer to Figure 21 to Figure 33), used in asynchronous accesses: For read accesses For write accesses.'
bit_offset: 30
bit_size: 2
fieldset/BWTR:
description: SRAM/NOR-Flash write timing registers 1.
fields:
- name: ADDSET
description: 'Address setup phase duration. These bits are written by software to define the duration of the address setup phase in HCLK cycles (refer to Figure 21 to Figure 33), used in asynchronous accesses: ... Note: In synchronous accesses, this value is not used, the address setup phase is always 1 Flash clock period duration. In muxed mode, the minimum ADDSET value is 1.'
bit_offset: 0
bit_size: 4
- name: ADDHLD
description: 'Address-hold phase duration. These bits are written by software to define the duration of the address hold phase (refer to Figure 30 to Figure 33), used in asynchronous multiplexed accesses: ... Note: In synchronous NOR Flash accesses, this value is not used, the address hold phase is always 1 Flash clock period duration.'
bit_offset: 4
bit_size: 4
- name: DATAST
description: 'Data-phase duration. These bits are written by software to define the duration of the data phase (refer to Figure 21 to Figure 33), used in asynchronous SRAM, PSRAM and NOR Flash memory accesses: ...'
bit_offset: 8
bit_size: 8
- name: BUSTURN
description: Bus turnaround phase duration These bits are written by software to add a delay at the end of current write transaction to next transaction on the same bank. For FRAM memories, the bus turnaround delay should be configured to match the minimum t<sub>PC</sub> (precharge time) timings. The bus turnaround delay is inserted between any consecutive transactions on the same bank (read/read, write/write, read/write and write/read). The chip select is toggling between any consecutive accesses. (BUSTURN + 1)HCLK period ≥ tPC min ...
bit_offset: 16
bit_size: 4
- name: ACCMOD
description: Access mode. Specifies 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.
bit_offset: 28
bit_size: 2
- name: DATAHLD
description: Data hold phase duration These bits are written by software to define the duration of the data hold phase in HCLK cycles (refer to Figure 21 to Figure 33), used in asynchronous write accesses:.
bit_offset: 30
bit_size: 2
fieldset/PATT:
description: Attribute memory space timing register.
fields:
- name: ATTSET
description: Attribute memory setup time Defines the number of HCLK (+1) clock cycles to set up address before the command assertion (NWE, NOE), for NAND Flash read or write access to attribute memory space on socket:.
bit_offset: 0
bit_size: 8
- name: ATTWAIT
description: Attribute memory wait time Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, NOE), for NAND Flash read or write access to attribute memory space on socket x. The duration for command assertion is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value of HCLK:.
bit_offset: 8
bit_size: 8
- name: ATTHOLD
description: Attribute memory hold time Defines the number of HCLK clock cycles for write access and HCLK (+2) clock cycles for read access during which the address is held (and data for write access) after the command deassertion (NWE, NOE), for NAND Flash read or write access to attribute memory space on socket:.
bit_offset: 16
bit_size: 8
- name: ATTHIZ
description: Attribute memory data bus Hi-Z time Defines the number of HCLK clock cycles during which the data bus is kept in Hi-Z after the start of a NAND Flash write access to attribute memory space on socket. Only valid for writ transaction:.
bit_offset: 24
bit_size: 8
fieldset/PCR:
description: NAND Flash control registers.
fields:
- name: PWAITEN
description: Wait feature enable bit Enables the Wait feature for the NAND Flash memory bank:.
bit_offset: 1
bit_size: 1
- name: PBKEN
description: NAND Flash memory bank enable bit Enables the memory bank. Accessing a disabled memory bank causes an ERROR on AHB bus.
bit_offset: 2
bit_size: 1
- name: PTYP
description: Memory type Defines the type of device attached to the corresponding memory bank:.
bit_offset: 3
bit_size: 1
- name: PWID
description: Data bus width Defines the external memory device width.
bit_offset: 4
bit_size: 2
- name: ECCEN
description: ECC computation logic enable bit.
bit_offset: 6
bit_size: 1
- name: TCLR
description: 'CLE to RE delay Sets time from CLE low to RE low in number of AHB clock cycles (HCLK). Time is t_clr = (TCLR + SET + 2) <20> THCLK where THCLK is the HCLK clock period Note: SET is MEMSET or ATTSET according to the addressed space.'
bit_offset: 9
bit_size: 4
- name: TAR
description: 'ALE to RE delay Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). Time is: t_ar = (TAR + SET + 2) <20> THCLK where THCLK is the HCLK clock period Note: SET is MEMSET or ATTSET according to the addressed space.'
bit_offset: 13
bit_size: 3
- name: TAR3
description: 'ALE to RE delay Sets time from ALE low to RE low in number of AHB clock cycles (HCLK). Time is: t_ar = (TAR + SET + 2) <20> THCLK where THCLK is the HCLK clock period Note: SET is MEMSET or ATTSET according to the addressed space.'
bit_offset: 16
bit_size: 1
- name: ECCPS
description: ECC page size Defines the page size for the extended ECC:.
bit_offset: 17
bit_size: 3
fieldset/PCSCNTR:
description: PSRAM chip select counter register.
fields:
- name: CSCOUNT
description: Chip select counter. These bits are written by software to define the maximum chip select low pulse duration. It is expressed in FMC_CLK cycles for synchronous accesses and in HCLK cycles for asynchronous accesses. The counter is disabled if the programmed value is 0.
bit_offset: 0
bit_size: 16
- name: CNTB1EN
description: Counter Bank 1 enable This bit enables the chip select counter for PSRAM/NOR Bank 1.
bit_offset: 16
bit_size: 1
- name: CNTB2EN
description: Counter Bank 2 enable This bit enables the chip select counter for PSRAM/NOR Bank 2.
bit_offset: 17
bit_size: 1
- name: CNTB3EN
description: Counter Bank 3 enable This bit enables the chip select counter for PSRAM/NOR Bank 3.
bit_offset: 18
bit_size: 1
- name: CNTB4EN
description: Counter Bank 4 enable This bit enables the chip select counter for PSRAM/NOR Bank 4.
bit_offset: 19
bit_size: 1
fieldset/PMEM:
description: Common memory space timing register.
fields:
- name: MEMSET
description: Common memory x setup time Defines the number of HCLK (+1) clock cycles to set up the address before the command assertion (NWE, NOE), for NAND Flash read or write access to common memory space on socket x:.
bit_offset: 0
bit_size: 8
- name: MEMWAIT
description: Common memory wait time Defines the minimum number of HCLK (+1) clock cycles to assert the command (NWE, NOE), for NAND Flash read or write access to common memory space on socket. The duration of command assertion is extended if the wait signal (NWAIT) is active (low) at the end of the programmed value of HCLK:.
bit_offset: 8
bit_size: 8
- name: MEMHOLD
description: Common memory hold time Defines the number of HCLK clock cycles for write access and HCLK (+2) clock cycles for read access during which the address is held (and data for write accesses) after the command is deasserted (NWE, NOE), for NAND Flash read or write access to common memory space on socket x:.
bit_offset: 16
bit_size: 8
- name: MEMHIZ
description: Common memory x data bus Hi-Z time Defines the number of HCLK clock cycles during which the data bus is kept Hi-Z after the start of a NAND Flash write access to common memory space on socket. This is only valid for write transactions:.
bit_offset: 24
bit_size: 8
fieldset/SDCMR:
description: SDRAM Command Mode register.
fields:
- name: MODE
description: 'Command mode These bits define the command issued to the SDRAM device. Note: When a command is issued, at least one Command Target Bank bit ( CTB1 or CTB2) must be set otherwise the command will be ignored. Note: If two SDRAM banks are used, the Auto-refresh and PALL command must be issued simultaneously to the two devices with CTB1 and CTB2 bits set otherwise the command will be ignored. Note: If only one SDRAM bank is used and a command is issued with its associated CTB bit set, the other CTB bit of the the unused bank must be kept to 0.'
bit_offset: 0
bit_size: 3
- name: CTB2
description: Command Target Bank 2 This bit indicates whether the command will be issued to SDRAM Bank 2 or not.
bit_offset: 3
bit_size: 1
- name: CTB1
description: Command Target Bank 1 This bit indicates whether the command will be issued to SDRAM Bank 1 or not.
bit_offset: 4
bit_size: 1
- name: NRFS
description: Number of Auto-refresh These bits define the number of consecutive Auto-refresh commands issued when MODE = 011. ....
bit_offset: 5
bit_size: 4
- name: MRD
description: Mode Register definition This 13-bit field defines the SDRAM Mode Register content. The Mode Register is programmed using the Load Mode Register command.
bit_offset: 9
bit_size: 13
fieldset/SDCR:
description: SDRAM control registers 1.
fields:
- name: NC
description: Number of column address bits These bits define the number of bits of a column address.
bit_offset: 0
bit_size: 2
- name: NR
description: Number of row address bits These bits define the number of bits of a row address.
bit_offset: 2
bit_size: 2
- name: MWID
description: Memory data bus width. These bits define the memory device width.
bit_offset: 4
bit_size: 2
- name: NB
description: Number of internal banks This bit sets the number of internal banks.
bit_offset: 6
bit_size: 1
- name: CAS
description: CAS Latency This bits sets the SDRAM CAS latency in number of memory clock cycles.
bit_offset: 7
bit_size: 2
- name: WP
description: Write protection This bit enables write mode access to the SDRAM bank.
bit_offset: 9
bit_size: 1
- name: SDCLK
description: 'SDRAM clock configuration These bits define the SDRAM clock period for both SDRAM banks and allow disabling the clock before changing the frequency. In this case the SDRAM must be re-initialized. Note: The corresponding bits in the FMC_SDCR2 register are dont care.'
bit_offset: 10
bit_size: 2
- name: RBURST
description: 'Burst read This bit enables Burst read mode. The SDRAM controller anticipates the next read commands during the CAS latency and stores data in the Read FIFO. Note: The corresponding bit in the FMC_SDCR2 register is dont care.'
bit_offset: 12
bit_size: 1
- name: RPIPE
description: 'Read pipe These bits define the delay, in clock cycles, for reading data after CAS latency. Note: The corresponding bits in the FMC_SDCR2 register is read only.'
bit_offset: 13
bit_size: 2
fieldset/SDRTR:
description: SDRAM refresh timer register.
fields:
- name: CRE
description: Clear Refresh error flag This bit is used to clear the Refresh Error Flag (RE) in the Status Register.
bit_offset: 0
bit_size: 1
- name: COUNT
description: Refresh Timer Count This 13-bit field defines the refresh rate of the SDRAM device. It is expressed in number of memory clock cycles. It must be set at least to 41 SDRAM clock cycles (0x29). Refresh rate = (COUNT + 1) x SDRAM frequency clock COUNT = (SDRAM refresh period / Number of rows) - 20.
bit_offset: 1
bit_size: 13
- name: REIE
description: RES Interrupt Enable.
bit_offset: 14
bit_size: 1
fieldset/SDSR:
description: SDRAM status register.
fields:
- name: RE
description: Refresh error flag An interrupt is generated if REIE = 1 and RE = 1.
bit_offset: 0
bit_size: 1
- name: MODES1
description: Status Mode for Bank 1 This bit defines the Status Mode of SDRAM Bank 1.
bit_offset: 1
bit_size: 2
- name: MODES2
description: Status Mode for Bank 2 This bit defines the Status Mode of SDRAM Bank 2.
bit_offset: 3
bit_size: 2
- name: BUSY
description: Busy status This bit defines the status of the SDRAM controller after a Command Mode request 1; SDRAM Controller is not ready to accept a new request.
bit_offset: 5
bit_size: 1
fieldset/SDTR:
description: SDRAM timing registers 1.
fields:
- name: TMRD
description: Load Mode Register to Active These bits define the delay between a Load Mode Register command and an Active or Refresh command in number of memory clock cycles. ....
bit_offset: 0
bit_size: 4
- name: TXSR
description: 'Exit Self-refresh delay These bits define the delay from releasing the Self-refresh command to issuing the Activate command in number of memory clock cycles. .... Note: If two SDRAM devices are used, the FMC_SDTR1 and FMC_SDTR2 must be programmed with the same TXSR timing corresponding to the slowest SDRAM device.'
bit_offset: 4
bit_size: 4
- name: TRAS
description: Self refresh time These bits define the minimum Self-refresh period in number of memory clock cycles. ....
bit_offset: 8
bit_size: 4
- name: TRC
description: 'Row cycle delay These bits define the delay between the Refresh command and the Activate command, as well as the delay between two consecutive Refresh commands. It is expressed in number of memory clock cycles. The TRC timing is only configured in the FMC_SDTR1 register. If two SDRAM devices are used, the TRC must be programmed with the timings of the slowest device. .... Note: TRC must match the TRC and TRFC (Auto Refresh period) timings defined in the SDRAM device datasheet. Note: The corresponding bits in the FMC_SDTR2 register are dont care.'
bit_offset: 12
bit_size: 4
- name: TWR
description: 'Recovery delay These bits define the delay between a Write and a Precharge command in number of memory clock cycles. .... Note: TWR must be programmed to match the write recovery time (t<sub>WR</sub>) defined in the SDRAM datasheet, and to guarantee that: Note: TWR ≥ TRAS - TRCD and TWR ≥TRC - TRCD - TRP Note: Example: TRAS= 4 cycles, TRCD= 2 cycles. So, TWR >= 2 cycles. TWR must be programmed to 0x1. Note: If two SDRAM devices are used, the FMC_SDTR1 and FMC_SDTR2 must be programmed with the same TWR timing corresponding to the slowest SDRAM device. Note: If only one SDRAM device is used, the TWR timing must be kept at reset value (0xF) for the not used bank.'
bit_offset: 16
bit_size: 4
- name: TRP
description: 'Row precharge delay These bits define the delay between a Precharge command and another command in number of memory clock cycles. The TRP timing is only configured in the FMC_SDTR1 register. If two SDRAM devices are used, the TRP must be programmed with the timing of the slowest device. .... Note: The corresponding bits in the FMC_SDTR2 register are dont care.'
bit_offset: 20
bit_size: 4
- name: TRCD
description: Row to column delay These bits define the delay between the Activate command and a Read/Write command in number of memory clock cycles. ....
bit_offset: 24
bit_size: 4
fieldset/SR:
description: FIFO status and interrupt register.
fields:
- name: IRS
description: 'Interrupt rising edge status The flag is set by hardware and reset by software. Note: If this bit is written by software to 1 it is set.'
bit_offset: 0
bit_size: 1
- name: ILS
description: Interrupt high-level status The flag is set by hardware and reset by software.
bit_offset: 1
bit_size: 1
- name: IFS
description: 'Interrupt falling edge status The flag is set by hardware and reset by software. Note: If this bit is written by software to 1 it is set.'
bit_offset: 2
bit_size: 1
- name: IREN
description: Interrupt rising edge detection enable bit.
bit_offset: 3
bit_size: 1
- name: ILEN
description: Interrupt high-level detection enable bit.
bit_offset: 4
bit_size: 1
- name: IFEN
description: Interrupt falling edge detection enable bit.
bit_offset: 5
bit_size: 1
- name: FEMPT
description: FIFO empty Read-only bit that provides the status of the FIFO.
bit_offset: 6
bit_size: 1