imxrt1170evk_fcb

Struct ConfigurationBlock

Source
#[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

Source

pub const fn new(mem_cfg: ConfigurationBlock) -> ConfigurationBlock

Create a new serial NOR configuration block based on the FlexSPI configuration block

Source

pub const fn page_size(self, page_size: u32) -> ConfigurationBlock

Set the serial NOR page size

Source

pub const fn sector_size(self, sector_size: u32) -> ConfigurationBlock

Set the serial NOR sector size

Source

pub const fn ip_cmd_serial_clk_freq( self, serial_clock_frequency: SerialClockFrequency, ) -> ConfigurationBlock

Set the serial clock frequency

Source§

impl ConfigurationBlock

Source

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

Source§

fn clone(&self) -> ConfigurationBlock

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConfigurationBlock

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Copy for ConfigurationBlock

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.