[−][src]Module imxrt_boot_gen::flexspi
FlexSPI configuration block definitions
The FlexSPI module includes
- instruction sequences
- instruction lookup table (LUT)
- the FlexSPI configuration block
The flexspi
types are used throughout the serial_flash
API, since the FlexSPI
configuration block is at the start of every serial NOR / NAND configuration block.
Sequences and LUTs
A Sequence
is a collection of up to eight FlexSPI instructions (Instr
).
The FlexSPI controller sequentially executes instructions to perform reads, writes
and I/O with a connected FLASH device. The FlexSPI controller finds each sequence
in a LookupTable
.
Use a SequenceBuilder
to create Sequence
s:
use imxrt_boot_gen::flexspi::{Instr, Sequence, SequenceBuilder, Pads, opcodes::sdr::*}; const SEQ_READ: Sequence = SequenceBuilder::new() .instr(Instr::new(CMD, Pads::One, FAST_READ_QUAD_IO)) .instr(Instr::new(RADDR, Pads::Four, 0x18)) .instr(Instr::new(DUMMY, Pads::Four, 0x06)) .instr(Instr::new(READ, Pads::Four, 0x04)) .build(); const SEQ_READ_STATUS: Sequence = SequenceBuilder::new() .instr(Instr::new(CMD, Pads::One, READ_STATUS_REGISTER_1)) .instr(Instr::new(READ, Pads::One, 0x04)) .build();
Then, assign each sequence to a Command
in a LookupTable
:
use imxrt_boot_gen::flexspi::{Command, LookupTable}; const LUT: LookupTable = LookupTable::new() .command(Command::Read, SEQ_READ) .command(Command::ReadStatus, SEQ_READ_STATUS);
FlexSPI Configuration Block
Once you've created your sequences and lookup table, use the lookup table to create
a ConfigurationBlock
. See the ConfigurationBlock
documentation
for more information.
Modules
opcodes | FlexSPI lookup table instruction opcodes |
Structs
ConfigurationBlock | FlexSPI configuration block |
DeviceModeSequence | Sequence parameter for device mode configuration |
Instr | A FlexSPI instruction |
LookupTable | A sequence lookup table, part of the general FlexSPI configuration block |
Sequence | A collection of FlexSPI instructions |
SequenceBuilder | A |
WaitTimeConfigurationCommands | Wait time for all configuration commands |
Enums
ColumnAddressWidth |
|
Command | The default sequence definition lookup indices |
DeviceModeConfiguration | Describes both the |
FlashPadType |
|
Pads | Number of pads to use to execute the instruction |
ReadSampleClockSource |
|
SerialClockFrequency |
|
SerialFlashRegion | A FlexSPI serial flash region |
Constants
JUMP_ON_CS | JUMP_ON_CS FlexSPI instruction |
RECOMMENDED_CS_HOLD_TIME | The recommended |
RECOMMENDED_CS_SETUP_TIME | The recommended |
STOP | STOP FlexSPI instruction |