Module imxrt_boot_gen::flexspi
source · Expand description
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§
- FlexSPI lookup table instruction opcodes
Structs§
- FlexSPI configuration block
- Sequence parameter for device mode configuration
- A FlexSPI instruction
- A sequence lookup table, part of the general FlexSPI configuration block
- A collection of FlexSPI instructions
- A
Sequence
builder - A version identifier.
- Wait time for all configuration commands
Enums§
columnAdressWidth
- The default sequence definition lookup indices
- Describes both the
deviceModeCfgEnable
field, and thedeviceModeArg
field, which is only valid if the configuration is enabled. sFlashPad
field- Number of pads to use to execute the instruction
readSampleClkSrc
of the general FCBserialClkFreq
- A FlexSPI serial flash region
Constants§
- JUMP_ON_CS FlexSPI instruction
- The recommended
csHoldTime
,0x03
. - The recommended
csSetupTime
,0x03
. - STOP FlexSPI instruction
- The default FCB version used by this library.