#[repr(C, packed(1))]pub struct ConfigurationBlock { /* private fields */ }
Expand description
A serial NOR configuration block
This is the memory that you’ll need to properly place in memory in order to boot your i.MX RT system. Consider keeping the symbol name, and specifying a link section, so that you can more easily place the memory in your linker script.
Unless otherwise specified, all unset fields are set to a bitpattern of zero.
§1170 notes
By default, isUniformBlockSize
is set to 1, indicating that the block size and
sector sizes are equal. Using block_size
clears this field and allows you to
differentiate the block size from the sector size.
use imxrt_boot_gen::serial_flash::nor;
#[no_mangle]
#[link_section = ".serial_nor_cb"]
static SERIAL_NOR_CONFIGURATION_BLOCK: nor::ConfigurationBlock =
nor::ConfigurationBlock::new(FLEXSPI_CONFIGURATION_BLOCK)
.page_size(256)
.sector_size(4096)
.ip_cmd_serial_clk_freq(nor::SerialClockFrequency::MHz30);
Implementations§
Source§impl ConfigurationBlock
impl ConfigurationBlock
Sourcepub const fn new(mem_cfg: ConfigurationBlock) -> ConfigurationBlock
pub const fn new(mem_cfg: ConfigurationBlock) -> ConfigurationBlock
Create a new serial NOR configuration block based on the FlexSPI configuration block
Sourcepub const fn page_size(self, page_size: u32) -> ConfigurationBlock
pub const fn page_size(self, page_size: u32) -> ConfigurationBlock
Set the serial NOR page size
Sourcepub const fn sector_size(self, sector_size: u32) -> ConfigurationBlock
pub const fn sector_size(self, sector_size: u32) -> ConfigurationBlock
Set the serial NOR sector size
Sourcepub const fn ip_cmd_serial_clk_freq(
self,
serial_clock_frequency: SerialClockFrequency,
) -> ConfigurationBlock
pub const fn ip_cmd_serial_clk_freq( self, serial_clock_frequency: SerialClockFrequency, ) -> ConfigurationBlock
Set the serial clock frequency
Source§impl ConfigurationBlock
impl ConfigurationBlock
Sourcepub const fn block_size(self, block_size: u32) -> ConfigurationBlock
pub const fn block_size(self, block_size: u32) -> ConfigurationBlock
Set the serial NOR block size if it differs from the sector size.
By default, the configuration block signals to the hardware that the sector size is the same as the block size. Calling this will override that setting, allowing you to configure a different block size.
The behavior is unspecified if you call this with a block size that’s equal to the sector size.
Trait Implementations§
Source§impl Clone for ConfigurationBlock
impl Clone for ConfigurationBlock
Source§fn clone(&self) -> ConfigurationBlock
fn clone(&self) -> ConfigurationBlock
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more