Configuration structure for SEMC (Smart External Memory Controller) interface.
More...
Configuration structure for SEMC (Smart External Memory Controller) interface.
This structure configures the timing and control parameters for SEMC chip selects, supporting both synchronous and asynchronous memory devices. The SEMC interface allows connection to external SRAM, PSRAM, NOR Flash, and other parallel memory devices.
The configuration is divided into three control registers (CR0, CR1, CR2) that can be accessed either as structured bit fields or as complete 32-bit values for direct register programming.
- Note
- All timing parameters marked as "n+1" mean the actual bus timing will be the configured value plus one clock cycle. For example, cs_setup = 2 results in 3 clock cycles on the bus.
- Parameters marked "async mode only" are ignored in synchronous/burst mode and vice versa. Refer to the clkMode field to determine which mode is active.
Expand for Example Usage
Examples
- Asynchronous SRAM Configuration (8-bit)
asyncSRAM.busWidth = SEMC_BUS_WIDTH_8BIT;
asyncSRAM.clkMode = SEMC_CLK_ASYNC;
asyncSRAM.muxMode = SEMC_MUX_A8;
asyncSRAM.cs_setup = 1;
asyncSRAM.cs_hold_min = 1;
asyncSRAM.addr_setup = 1;
asyncSRAM.addr_hold = 1;
asyncSRAM.wr_en_lo = 2;
asyncSRAM.wr_en_hi = 2;
asyncSRAM.rd_en_lo = 2;
asyncSRAM.rd_en_hi = 2;
asyncSRAM.addr_wr_hold = 1;
asyncSRAM.turnaround = 2;
asyncSRAM.cs_min_intv = 1;
asyncSRAM.
csPin = Pins[10];
Configuration structure for SEMC (Smart External Memory Controller) interface.
Definition MIMXRT10xx/include/semc.h:799
PinIO csPin
Definition MIMXRT10xx/include/semc.h:865
- Synchronous Burst PSRAM Configuration (16-bit)
syncPSRAM.busWidth = SEMC_BUS_WIDTH_16BIT;
syncPSRAM.clkMode = SEMC_CLK_SYNC;
syncPSRAM.burstLen = SEMC_BURST_8;
syncPSRAM.muxMode = SEMC_MUX_A8;
syncPSRAM.colAddrWidth = SEMC_COL_ADDR_10BIT;
syncPSRAM.cs_setup = 0;
syncPSRAM.cs_hold_min = 0;
syncPSRAM.addr_setup = 0;
syncPSRAM.addr_hold = 1;
syncPSRAM.wr_dat_setup = 1;
syncPSRAM.wr_dat_hold = 1;
syncPSRAM.latency = 3;
syncPSRAM.rd_cycle = 3;
syncPSRAM.rd_hold = 1;
syncPSRAM.cs_min_intv = 1;
syncPSRAM.
csPin = Pins[16];
PinIO clkPin
Definition MIMXRT10xx/include/semc.h:864
- Fast NOR Flash Configuration (Async Mode)
norFlash.busWidth = SEMC_BUS_WIDTH_16BIT;
norFlash.clkMode = SEMC_CLK_ASYNC;
norFlash.muxMode = SEMC_MUX_A8;
norFlash.cs_setup = 0;
norFlash.cs_hold_min = 0;
norFlash.addr_setup = 0;
norFlash.addr_hold = 0;
norFlash.wr_en_lo = 3;
norFlash.wr_en_hi = 3;
norFlash.rd_en_lo = 4;
norFlash.rd_en_hi = 4;
norFlash.addr_wr_hold = 1;
norFlash.turnaround = 3;
norFlash.cs_min_intv = 2;
norFlash.
csPin = Pins[20];
- Direct Register Programming
directConfig.CR0 = 0x00000091;
directConfig.CR1 = 0x22222222;
directConfig.CR2 = 0x11111111;
directConfig.
csPin = Pins[12];