[−][src]Struct imxrt_boot_gen::flexspi::ConfigurationBlock
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
cs_hold_time
isRECOMMENDED_CS_HOLD_TIME
cs_setup_time
isRECOMMENDED_CS_SETUP_TIME
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]
self,
read_sample_clk_src: ReadSampleClockSource
) -> Self
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]
self,
column_address_width: ColumnAddressWidth
) -> Self
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]
self,
device_mode_configuration: DeviceModeConfiguration
) -> Self
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]
self,
wait_time_cfg_commands: WaitTimeConfigurationCommands
) -> Self
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]
self,
serial_flash_pad_type: FlashPadType
) -> Self
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]
self,
serial_clk_freq: SerialClockFrequency
) -> Self
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]
self,
flash_region: SerialFlashRegion,
flash_size: u32
) -> Self
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]
pub fn clone(&self) -> ConfigurationBlock
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ConfigurationBlock
[src]
impl Debug for ConfigurationBlock
[src]
Auto Trait Implementations
impl Send for ConfigurationBlock
[src]
impl Sync for ConfigurationBlock
[src]
impl Unpin for ConfigurationBlock
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,