55#ifndef PERIPH_CPU_FMC_H
56#define PERIPH_CPU_FMC_H
74#ifndef FMC_BANK_CONFIG
75#define FMC_BANK_CONFIG(n) (&fmc_bank_config[n])
86#if MODULE_PERIPH_FMC_32BIT || DOXYGEN
87#define FMC_DATA_PIN_NUMOF (32)
88#elif MODULE_PERIPH_FMC_16BIT
89#define FMC_DATA_PIN_NUMOF (16)
91#define FMC_DATA_PIN_NUMOF (8)
104#if MODULE_PERIPH_FMC_NOR_SRAM || DOXYGEN
105#define FMC_ADDR_PIN_NUMOF (26)
106#elif MODULE_PERIPH_FMC_SDRAM
107#define FMC_ADDR_PIN_NUMOF (13)
109#define FMC_ADDR_PIN_NUMOF (0)
123#define FMC_RAM_ADDR 0x60000000
137#define FMC_RAM_LEN 1024K
198 FMC_BURST_LENGTH_1 = 0,
199 FMC_BURST_LENGTH_2 = 1,
200 FMC_BURST_LENGTH_4 = 2,
201 FMC_BURST_LENGTH_8 = 3,
202 FMC_BURST_LENGTH_16 = 4,
203 FMC_BURST_LENGTH_32 = 5,
204 FMC_BURST_LENGTH_64 = 6,
205 FMC_BURST_LENGTH_FULL = 7,
282#if FMC_ADDR_PIN_NUMOF || DOXYGEN
291#if MODULE_PERIPH_FMC_NOR_SRAM
302#if MODULE_PERIPH_FMC_SDRAM
322#if defined(FMC_Bank2_3_R_BASE)
325#if defined(FMC_Bank2_3_R_BASE) || defined(FMC_Bank3_R_BASE)
328#if defined(FMC_Bank4_R_BASE)
331#if defined(FMC_Bank5_6_R_BASE)
GPIO CPU definitions for the STM32 family.
gpio_af_t
Override alternative GPIO mode options.
#define FMC_DATA_PIN_NUMOF
Number of data pins used.
#define FMC_ADDR_PIN_NUMOF
Number of address pins used.
fmc_mem_type_t
Memory types supported by the FMC controller.
fmc_access_mode_t
Memory access modes for NOR/PSRAM/SRAM in extended mode.
uint8_t fmc_bank_id_t
FMC bank identifier.
fmc_bus_width_t
Memory data bus widths.
fmc_bust_length_t
SDRAM Burst Length as an exponent of a power of two.
@ FMC_SDRAM
SDRAM Controller used.
@ FMC_MODE_A
Access mode A.
@ FMC_MODE_B
Access mode B.
@ FMC_MODE_C
Access mode C.
@ FMC_MODE_D
Access mode D.
@ FMC_BUS_WIDTH_16BIT
16 bit data bus width
@ FMC_BUS_WIDTH_32BIT
32 bit data bus width
@ FMC_BUS_WIDTH_8BIT
8 bit data bus width
@ FMC_BANK_1
Bank 1 is always available and used for NOR, PSRAM, SRAM.
Bank configuration structure.
fmc_bus_width_t data_width
Data bus width.
uint32_t address
Address of the memory bank.
uint32_t size
Size in bytes of the memory bank.
fmc_mem_type_t mem_type
Type of memory.
FMC peripheral configuration.
fmc_gpio_t nwait_pin
NWAIT pin.
fmc_gpio_t nbl0_pin
NBL0 pin.
fmc_gpio_t nbl1_pin
NBL1 pin.
fmc_gpio_t nbl2_pin
NBL2 pin.
uint32_t rcc_mask
Bit in clock enable register.
fmc_gpio_t nbl3_pin
NBL3 pin.
FMC GPIO configuration type.
gpio_af_t af
Alternate function.
Bank configuration structure for NOR/PSRAM/SRAM.
bool ext_mode
Extended mode used (separate read and write timings)
fmc_nor_sram_timing_t w_timing
Write timings (only used if fmc_nor_sram_bank_conf_t::ext_mode is true)
bool wait_enable
Wait signal used for synchronous access.
bool mux_enable
Multiplexed address/data signals used (only valid for PSRAMs and NORs.
uint8_t sub_bank
Bank1 has 4 subbanks 1..4.
fmc_nor_sram_timing_t r_timing
Read timings (also used for write if fmc_nor_sram_bank_conf_t::ext_mode is false)
Timing configuration for NOR/PSRAM/SRAM.
uint8_t bus_turnaround
Bus turnaround phase duration [0..15], default 15.
uint8_t clk_div
Clock divide ratio, FMC_CLK = HCLK / (DIV + 1)
uint8_t data_setup
Data setup time [0..15], default 15.
uint8_t addr_hold
Address hold time [0..15], default 15.
fmc_access_mode_t mode
Access Mode used (only used if fmc_nor_sram_bank_conf_t::ext_mode is true)
uint8_t addr_setup
Address setup time [0..15], default 15.
uint8_t data_latency
Data latency for synchronous access [0..15], default 15 (only used in read timing)
Bank configuration structure for SDRAM.
uint8_t cas_latency
CAS latency in SDCLK clock cycles [1..3].
bool burst_write
Burst write mode enabled.
uint8_t col_bits
Number column address bits [8..11].
bool burst_read
Burst read mode enabled.
uint8_t row_bits
Number row address bits [11..13].
fmc_bust_length_t burst_len
Burst length as an exponent of a power of two.
fmc_sdram_timing_t timing
SDRAM Timing configuration.
bool write_protect
Write protection enabled.
uint8_t read_delay
Delay for reading data after CAS latency in HCLKs [0..2].
bool burst_interleaved
Burst mode interleaved, otherwise sequential.
bool four_banks
SDRAM has four internal banks.
uint8_t clk_period
CLK period [0,2,3] (0 - disabled, n * HCLK cycles)
Timing configuration for SDRAM.
uint8_t refresh_period
Refresh period in milliseconds.
uint8_t row_precharge
Row precharge delay in SDCLK clock cycles [1..15], delay between Precharge and another command.
uint8_t row_cylce
Row cycle delay in SDCLK clock cycles [1..15], delay between Refresh and Activate command.
uint8_t row_to_col_delay
Row to column delay in SDCLK clock cycles [1..16], delay between Activate and Read/Write command.
uint8_t load_mode_register
Load Mode Register to Activate delay in SDCLK clock cycles [1..15], delay between Load Mode Register ...
uint8_t self_refresh
Self refresh time in SDCLK clock cycles [1..15].
uint8_t exit_self_refresh
Exit self-refresh delay in SDCLK clock cycles [1..15], delay between Self-Refresh and Activate comman...
uint8_t recovery_delay
Recovery delay in SDCLK clock cycles [1..15], delay between Write and Precharge command.