[][src]Struct imxrt_boot_gen::flexspi::ConfigurationBlock

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

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

impl ConfigurationBlock[src]

pub const fn new(lookup_table: LookupTable) -> Self[src]

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

pub const fn read_sample_clk_src(
    self,
    read_sample_clk_src: ReadSampleClockSource
) -> Self
[src]

readSampleClkSrc, the clock source for FlexSPI

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

pub const fn cs_hold_time(self, cs_hold_time: u8) -> Self[src]

Set the chip select hold time (csHoldTime)

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

pub const fn cs_setup_time(self, cs_setup_time: u8) -> Self[src]

Set the chip select setup time (csSetupTime)

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

pub const fn column_address_width(
    self,
    column_address_width: ColumnAddressWidth
) -> Self
[src]

columnAddressWidth, the properties of the flash memory

If not set, this defaults to ColumnAddressWidth::OtherDevices

pub const fn device_mode_configuration(
    self,
    device_mode_configuration: DeviceModeConfiguration
) -> Self
[src]

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.

pub const fn wait_time_cfg_commands(
    self,
    wait_time_cfg_commands: WaitTimeConfigurationCommands
) -> Self
[src]

Sets waitTimeCfgCommands

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

pub const fn serial_flash_pad_type(
    self,
    serial_flash_pad_type: FlashPadType
) -> Self
[src]

Sets the serial flash pad type, sFlashPad.

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

pub const fn serial_clk_freq(
    self,
    serial_clk_freq: SerialClockFrequency
) -> Self
[src]

Sets the serial clock frequencey, serialClkFreq

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

pub const fn flash_size(
    self,
    flash_region: SerialFlashRegion,
    flash_size: u32
) -> Self
[src]

Set a flash size for the provided flash region

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

Trait Implementations

impl Clone for ConfigurationBlock[src]

impl Copy for ConfigurationBlock[src]

impl Debug for ConfigurationBlock[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.