#[repr(C, packed)]
pub struct ConfigurationBlock { /* private fields */ }
Expand description

FlexSPI configuration block

The FlexSPI configuration block consists of parameters that are for specific flash devices. The configuration block includes the FlexSPI LookupTable. The configuration block is shared between serial NOR and NAND configuration blocks.

Default Values

All other configurable values are set to a bit pattern of 0.

Examples

use imxrt_boot_gen::flexspi::*;

const FLEXSPI_CONFIGURATION_BLOCK: ConfigurationBlock =
    ConfigurationBlock::new(LUT)
        .read_sample_clk_src(ReadSampleClockSource::LoopbackFromDQSPad)
        .cs_hold_time(0x01)
        .cs_setup_time(0x02)
        .column_address_width(ColumnAddressWidth::OtherDevices)
        .device_mode_configuration(DeviceModeConfiguration::Disabled)
        .wait_time_cfg_commands(WaitTimeConfigurationCommands::new(40_000))
        .flash_size(SerialFlashRegion::A1, 0x0020_0000)
        .serial_clk_freq(SerialClockFrequency::MHz60)
        .serial_flash_pad_type(FlashPadType::Quad);

Implementations

Create a new configuration block that uses lookup_table as the FlexSPI LUT

Override the version.

The default value is VERSION_DEFAULT.

readSampleClkSrc, the clock source for FlexSPI

If not set, this defaults to ReadSampleClockSource::InternalLoopback.

Set the chip select hold time (csHoldTime)

If not set, this will be RECOMMENDED_CS_HOLD_TIME, which is 0x03.

Set the chip select setup time (csSetupTime)

If not set, this will be RECOMMENDED_CS_SETUP_TIME, which is 0x03.

columnAddressWidth, the properties of the flash memory

If not set, this defaults to ColumnAddressWidth::OtherDevices

Sets device configuration mode. The DeviceModeConfiguration::Disabled variant will set deviceModeCfgEnable to “disabled”. Otherwise, we will set deviceModeCfgEnable to “enabled,” and we use the sequence and argument parameters in the FCB.

If not set, this defaults to DeviceModeConfiguration::Disabled.

Sets waitTimeCfgCommands

If not set, this defaults to WaitTimeConfigurationCommands::disable().

Sets the serial flash pad type, sFlashPad.

If not set, this defaults to FlashPadType::Single.

Sets the serial clock frequencey, serialClkFreq

If not set, this defaults to SerialClockFrequency::MHz30.

Set a flash size for the provided flash region

Any region that’s not set will default to 0.

Set miscellaneous controller options.

See your chip’s reference manual for more information on valid values. This method performs no checking on the input.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.