Struct opentitanlib::spiflash::sfdp::JedecParams
source · pub struct JedecParams {Show 24 fields
pub block_erase_size: BlockEraseSize,
pub write_granularity: WriteGranularity,
pub write_en_required: bool,
pub write_en_opcode: u8,
pub erase_opcode_4kib: u8,
pub support_fast_read_112: bool,
pub address_modes: SupportedAddressModes,
pub support_double_rate_clocking: bool,
pub support_fast_read_122: bool,
pub support_fast_read_144: bool,
pub support_fast_read_114: bool,
pub support_fast_read_222: bool,
pub support_fast_read_444: bool,
pub density: u32,
pub param_112: FastReadParam,
pub param_122: FastReadParam,
pub param_114: FastReadParam,
pub param_144: FastReadParam,
pub param_222: FastReadParam,
pub param_444: FastReadParam,
pub erase: [SectorErase; 4],
pub rev_b: Option<JedecParamsRevB>,
pub rev_d: Option<JedecParamsRevD>,
pub rev_f: Option<JedecParamsRevF>,
}
Expand description
The JEDEC parameter table is documented in JESD216 “Serial Flash Discoverable Parameters”. This structure represents the parameter table after decoding it from the packed bitfield representation documented by JEDEC.
I have access to the following specs:
-
JESD216 dated April 2011 (Flash parameters version 1.0).
-
JESD216B dated May 2014 (Flash parameters version 1.6).
-
JESD216D dated August 2019 (Flash parameters version 1.7, unchanged since rev C).
-
JESD216F dated February 2022 (Flash parameters version 1.7, unchanged since rev D).
-
Version 1.0 defines a table of 9 “dwords”. I’m considering this to be the minimum required parameter table.
-
Rev B, version 1.6 extends the table to 16 “dwords”, including information about erase timing, powerdown and alternate mode requirements.
-
Rev D, version 1.7 extends the table to 20 “dwords”, including information about eight-lane SPI modes.
-
Rev F, version 1.7 extends the table to 23 “dwords”, including information about dual data rate operations.
Fields§
§block_erase_size: BlockEraseSize
Erase granularity.
write_granularity: WriteGranularity
Write granularity / buffer size.
write_en_required: bool
WREN instruction required for writing to volatile status register.
write_en_opcode: u8
Write enable opocde (this is a single bit in the jedec table; expanded to the actual opcode here).
erase_opcode_4kib: u8
Erase opcode for 4KiB sector erase.
support_fast_read_112: bool
Support Fast Read 1-1-2.
address_modes: SupportedAddressModes
The address modes supported by the device.
support_double_rate_clocking: bool
Device supports double rate clocking.
support_fast_read_122: bool
Other styles of Fast Read. The numerical designator refers to the instruction transfer mode, the address transfer mode and data transfer mode. ie: 1-2-2 means single bit mode for the opcode, dual mode for the address and dual mode for the data phase.
support_fast_read_144: bool
§support_fast_read_114: bool
§support_fast_read_222: bool
§support_fast_read_444: bool
§density: u32
The density of the part. In the jedec table, this is expressed in bits, but it is converted to bytes here.
param_112: FastReadParam
Parameters for the various supported FastRead modes.
param_122: FastReadParam
§param_114: FastReadParam
§param_144: FastReadParam
§param_222: FastReadParam
§param_444: FastReadParam
§erase: [SectorErase; 4]
Erase sector sizes. It is common for devices to support a 4KiB erase size, a 32KiB erase size and a 64KiB erase size.
rev_b: Option<JedecParamsRevB>
§rev_d: Option<JedecParamsRevD>
§rev_f: Option<JedecParamsRevF>
Trait Implementations§
source§impl Annotate for &JedecParams
impl Annotate for &JedecParams
fn format(&self, variant: Option<&str>, field: &MemberId<'_>) -> Option<Format>
fn comment(&self, variant: Option<&str>, field: &MemberId<'_>) -> Option<String>
fn as_annotate(&self) -> Option<&dyn Annotate>
fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_> ) -> Result<Document, Error>
source§impl Annotate for JedecParams
impl Annotate for JedecParams
fn format(&self, _variant: Option<&str>, field: &MemberId<'_>) -> Option<Format>
fn comment( &self, _variant: Option<&str>, field: &MemberId<'_> ) -> Option<String>
fn as_annotate(&self) -> Option<&dyn Annotate>
fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_> ) -> Result<Document, Error>
source§impl Debug for JedecParams
impl Debug for JedecParams
source§impl Default for JedecParams
impl Default for JedecParams
source§fn default() -> JedecParams
fn default() -> JedecParams
source§impl Serialize for JedecParams
impl Serialize for JedecParams
Auto Trait Implementations§
impl RefUnwindSafe for JedecParams
impl Send for JedecParams
impl Sync for JedecParams
impl Unpin for JedecParams
impl UnwindSafe for JedecParams
Blanket Implementations§
§impl<T> Annotate for Twhere
T: Serialize + ?Sized,
impl<T> Annotate for Twhere T: Serialize + ?Sized,
default fn format( &self, _variant: Option<&str>, _field: &MemberId<'_> ) -> Option<Format>
default fn comment( &self, _variant: Option<&str>, _field: &MemberId<'_> ) -> Option<String>
default fn as_annotate(&self) -> Option<&dyn Annotate>
default fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_> ) -> Result<Document, Error>
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T, U> ConsoleSend<T> for Uwhere
T: ConsoleDevice + ?Sized,
U: Serialize,
impl<T, U> ConsoleSend<T> for Uwhere T: ConsoleDevice + ?Sized, U: Serialize,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.