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

source§

fn format(&self, variant: Option<&str>, field: &MemberId<'_>) -> Option<Format>

source§

fn comment(&self, variant: Option<&str>, field: &MemberId<'_>) -> Option<String>

source§

fn as_annotate(&self) -> Option<&dyn Annotate>

§

fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_> ) -> Result<Document, Error>

source§

impl Annotate for JedecParams

source§

fn format(&self, _variant: Option<&str>, field: &MemberId<'_>) -> Option<Format>

source§

fn comment( &self, _variant: Option<&str>, field: &MemberId<'_> ) -> Option<String>

source§

fn as_annotate(&self) -> Option<&dyn Annotate>

§

fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_> ) -> Result<Document, Error>

source§

impl Debug for JedecParams

source§

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

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

impl Default for JedecParams

source§

fn default() -> JedecParams

Returns the “default value” for a type. Read more
source§

impl Serialize for JedecParams

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&[u8]> for JedecParams

§

type Error = Error

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

fn try_from(buf: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, U> ConsoleSend<T> for Uwhere T: ConsoleDevice + ?Sized, U: Serialize,

source§

fn send(&self, device: &T) -> Result<(), Error>

source§

fn send_with_crc(&self, device: &T) -> Result<(), Error>

§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. 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 Twhere 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.

§

impl<T> Pipe for Twhere T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,

Borrows 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,

Mutably borrows 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,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

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,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> Rwhere Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> Serialize for Twhere T: Serialize + ?Sized,

source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,

Immutable access to the 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,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,

Immutable access to the 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,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .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,

Calls .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,

Calls .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,

Calls .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,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V