pub struct OtpData { /* private fields */ }
Expand description
Predefined OTP data layout for RP2350
Implementations§
source§impl OtpData
impl OtpData
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
sourcepub const fn chipid0(self) -> Reg<u16, RW>
pub const fn chipid0(self) -> Reg<u16, RW>
Bits 15:0 of public device ID. (ECC) The CHIPID0..3 rows contain a 64-bit random identifier for this chip, which can be read from the USB bootloader PICOBOOT interface or from the get_sys_info ROM API. The number of random bits makes the occurrence of twins exceedingly unlikely: for example, a fleet of a hundred million devices has a 99.97% probability of no twinned IDs. This is estimated to be lower than the occurrence of process errors in the assignment of sequential random IDs, and for practical purposes CHIPID may be treated as unique.
sourcepub const fn randid0(self) -> Reg<u16, RW>
pub const fn randid0(self) -> Reg<u16, RW>
Bits 15:0 of private per-device random number (ECC) The RANDID0..7 rows form a 128-bit random number generated during device test. This ID is not exposed through the USB PICOBOOT GET_INFO command or the ROM get_sys_info()
API. However note that the USB PICOBOOT OTP access point can read the entirety of page 0, so this value is not meaningfully private unless the USB PICOBOOT interface is disabled via the DISABLE_BOOTSEL_USB_PICOBOOT_IFC flag in BOOT_FLAGS0.
sourcepub const fn randid1(self) -> Reg<u16, RW>
pub const fn randid1(self) -> Reg<u16, RW>
Bits 31:16 of private per-device random number (ECC)
sourcepub const fn randid2(self) -> Reg<u16, RW>
pub const fn randid2(self) -> Reg<u16, RW>
Bits 47:32 of private per-device random number (ECC)
sourcepub const fn randid3(self) -> Reg<u16, RW>
pub const fn randid3(self) -> Reg<u16, RW>
Bits 63:48 of private per-device random number (ECC)
sourcepub const fn randid4(self) -> Reg<u16, RW>
pub const fn randid4(self) -> Reg<u16, RW>
Bits 79:64 of private per-device random number (ECC)
sourcepub const fn randid5(self) -> Reg<u16, RW>
pub const fn randid5(self) -> Reg<u16, RW>
Bits 95:80 of private per-device random number (ECC)
sourcepub const fn randid6(self) -> Reg<u16, RW>
pub const fn randid6(self) -> Reg<u16, RW>
Bits 111:96 of private per-device random number (ECC)
sourcepub const fn randid7(self) -> Reg<u16, RW>
pub const fn randid7(self) -> Reg<u16, RW>
Bits 127:112 of private per-device random number (ECC)
sourcepub const fn rosc_calib(self) -> Reg<u16, RW>
pub const fn rosc_calib(self) -> Reg<u16, RW>
Ring oscillator frequency in kHz, measured during manufacturing (ECC) This is measured at 1.1 V, at room temperature, with the ROSC configuration registers in their reset state.
sourcepub const fn lposc_calib(self) -> Reg<u16, RW>
pub const fn lposc_calib(self) -> Reg<u16, RW>
Low-power oscillator frequency in Hz, measured during manufacturing (ECC) This is measured at 1.1V, at room temperature, with the LPOSC trim register in its reset state.
sourcepub const fn num_gpios(self) -> Reg<NumGpios, RW>
pub const fn num_gpios(self) -> Reg<NumGpios, RW>
The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)
sourcepub const fn info_crc0(self) -> Reg<u16, RW>
pub const fn info_crc0(self) -> Reg<u16, RW>
Lower 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (polynomial 0x4c11db7, input reflected, output reflected, seed all-ones, final XOR all-ones) (ECC)
sourcepub const fn info_crc1(self) -> Reg<u16, RW>
pub const fn info_crc1(self) -> Reg<u16, RW>
Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)
sourcepub const fn flash_devinfo(self) -> Reg<FlashDevinfo, RW>
pub const fn flash_devinfo(self) -> Reg<FlashDevinfo, RW>
Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set.
sourcepub const fn flash_partition_slot_size(self) -> Reg<u16, RW>
pub const fn flash_partition_slot_size(self) -> Reg<u16, RW>
Gap between partition table slot 0 and slot 1 at the start of flash (the default size is 4096 bytes) (ECC) Enabled by the OVERRIDE_FLASH_PARTITION_SLOT_SIZE bit in BOOT_FLAGS, the size is 4096 * (value + 1)
sourcepub const fn bootsel_led_cfg(self) -> Reg<BootselLedCfg, RW>
pub const fn bootsel_led_cfg(self) -> Reg<BootselLedCfg, RW>
Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set.
sourcepub const fn bootsel_pll_cfg(self) -> Reg<BootselPllCfg, RW>
pub const fn bootsel_pll_cfg(self) -> Reg<BootselPllCfg, RW>
Optional PLL configuration for BOOTSEL mode. (ECC) This should be configured to produce an exact 48 MHz based on the crystal oscillator frequency. User mode software may also use this value to calculate the expected crystal frequency based on an assumed 48 MHz PLL output. If no configuration is given, the crystal is assumed to be 12 MHz. The PLL frequency can be calculated as: PLL out = (XOSC frequency / (REFDIV+1)) x FBDIV / (POSTDIV1 x POSTDIV2) Conversely the crystal frequency can be calculated as: XOSC frequency = 48 MHz x (REFDIV+1) x (POSTDIV1 x POSTDIV2) / FBDIV (Note the +1 on REFDIV is because the value stored in this OTP location is the actual divisor value minus one.) Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0. That bit should be set only after this row and BOOTSEL_XOSC_CFG are both correctly programmed.
sourcepub const fn bootsel_xosc_cfg(self) -> Reg<BootselXoscCfg, RW>
pub const fn bootsel_xosc_cfg(self) -> Reg<BootselXoscCfg, RW>
Non-default crystal oscillator configuration for the USB bootloader. (ECC) These values may also be used by user code configuring the crystal oscillator. Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0. That bit should be set only after this row and BOOTSEL_PLL_CFG are both correctly programmed.
sourcepub const fn usb_white_label_addr(self) -> Reg<UsbWhiteLabelAddr, RW>
pub const fn usb_white_label_addr(self) -> Reg<UsbWhiteLabelAddr, RW>
Row index of the USB_WHITE_LABEL structure within OTP (ECC) The table has 16 rows, each of which are also ECC and marked valid by the corresponding valid bit in USB_BOOT_FLAGS (ECC). The entries are either _VALUEs where the 16 bit value is used as is, or _STRDEFs which acts as a pointers to a string value. The value stored in a _STRDEF is two separate bytes: The low seven bits of the first (LSB) byte indicates the number of characters in the string, and the top bit of the first (LSB) byte if set to indicate that each character in the string is two bytes (Unicode) versus one byte if unset. The second (MSB) byte represents the location of the string data, and is encoded as the number of rows from this USB_WHITE_LABEL_ADDR; i.e. the row of the start of the string is USB_WHITE_LABEL_ADDR value + msb_byte. In each case, the corresponding valid bit enables replacing the default value for the corresponding item provided by the boot rom. Note that Unicode _STRDEFs are only supported for USB_DEVICE_PRODUCT_STRDEF, USB_DEVICE_SERIAL_NUMBER_STRDEF and USB_DEVICE_MANUFACTURER_STRDEF. Unicode values will be ignored if specified for other fields, and non-unicode values for these three items will be converted to Unicode characters by setting the upper 8 bits to zero. Note that if the USB_WHITE_LABEL structure or the corresponding strings are not readable by BOOTSEL mode based on OTP permissions, or if alignment requirements are not met, then the corresponding default values are used. The index values indicate where each field is located (row USB_WHITE_LABEL_ADDR value + index):
sourcepub const fn otpboot_src(self) -> Reg<u16, RW>
pub const fn otpboot_src(self) -> Reg<u16, RW>
OTP start row for the OTP boot image. (ECC) If OTP boot is enabled, the bootrom will load from this location into SRAM and then directly enter the loaded image. Note that the image must be signed if SECURE_BOOT_ENABLE is set. The image itself is assumed to be ECC-protected. This must be an even number. Equivalently, the OTP boot image must start at a word-aligned location in the ECC read data address window.
sourcepub const fn otpboot_len(self) -> Reg<u16, RW>
pub const fn otpboot_len(self) -> Reg<u16, RW>
Length in rows of the OTP boot image. (ECC) OTPBOOT_LEN must be even. The total image size must be a multiple of 4 bytes (32 bits).
sourcepub const fn otpboot_dst0(self) -> Reg<u16, RW>
pub const fn otpboot_dst0(self) -> Reg<u16, RW>
Bits 15:0 of the OTP boot image load destination (and entry point). (ECC) This must be a location in main SRAM (main SRAM is addresses 0x20000000 through 0x20082000) and must be word-aligned.
sourcepub const fn otpboot_dst1(self) -> Reg<u16, RW>
pub const fn otpboot_dst1(self) -> Reg<u16, RW>
Bits 31:16 of the OTP boot image load destination (and entry point). (ECC) This must be a location in main SRAM (main SRAM is addresses 0x20000000 through 0x20082000) and must be word-aligned.
sourcepub const fn bootkey0_0(self) -> Reg<u16, RW>
pub const fn bootkey0_0(self) -> Reg<u16, RW>
Bits 15:0 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_1(self) -> Reg<u16, RW>
pub const fn bootkey0_1(self) -> Reg<u16, RW>
Bits 31:16 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_2(self) -> Reg<u16, RW>
pub const fn bootkey0_2(self) -> Reg<u16, RW>
Bits 47:32 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_3(self) -> Reg<u16, RW>
pub const fn bootkey0_3(self) -> Reg<u16, RW>
Bits 63:48 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_4(self) -> Reg<u16, RW>
pub const fn bootkey0_4(self) -> Reg<u16, RW>
Bits 79:64 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_5(self) -> Reg<u16, RW>
pub const fn bootkey0_5(self) -> Reg<u16, RW>
Bits 95:80 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_6(self) -> Reg<u16, RW>
pub const fn bootkey0_6(self) -> Reg<u16, RW>
Bits 111:96 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_7(self) -> Reg<u16, RW>
pub const fn bootkey0_7(self) -> Reg<u16, RW>
Bits 127:112 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_8(self) -> Reg<u16, RW>
pub const fn bootkey0_8(self) -> Reg<u16, RW>
Bits 143:128 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_9(self) -> Reg<u16, RW>
pub const fn bootkey0_9(self) -> Reg<u16, RW>
Bits 159:144 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_10(self) -> Reg<u16, RW>
pub const fn bootkey0_10(self) -> Reg<u16, RW>
Bits 175:160 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_11(self) -> Reg<u16, RW>
pub const fn bootkey0_11(self) -> Reg<u16, RW>
Bits 191:176 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_12(self) -> Reg<u16, RW>
pub const fn bootkey0_12(self) -> Reg<u16, RW>
Bits 207:192 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_13(self) -> Reg<u16, RW>
pub const fn bootkey0_13(self) -> Reg<u16, RW>
Bits 223:208 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_14(self) -> Reg<u16, RW>
pub const fn bootkey0_14(self) -> Reg<u16, RW>
Bits 239:224 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey0_15(self) -> Reg<u16, RW>
pub const fn bootkey0_15(self) -> Reg<u16, RW>
Bits 255:240 of SHA-256 hash of boot key 0 (ECC)
sourcepub const fn bootkey1_0(self) -> Reg<u16, RW>
pub const fn bootkey1_0(self) -> Reg<u16, RW>
Bits 15:0 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_1(self) -> Reg<u16, RW>
pub const fn bootkey1_1(self) -> Reg<u16, RW>
Bits 31:16 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_2(self) -> Reg<u16, RW>
pub const fn bootkey1_2(self) -> Reg<u16, RW>
Bits 47:32 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_3(self) -> Reg<u16, RW>
pub const fn bootkey1_3(self) -> Reg<u16, RW>
Bits 63:48 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_4(self) -> Reg<u16, RW>
pub const fn bootkey1_4(self) -> Reg<u16, RW>
Bits 79:64 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_5(self) -> Reg<u16, RW>
pub const fn bootkey1_5(self) -> Reg<u16, RW>
Bits 95:80 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_6(self) -> Reg<u16, RW>
pub const fn bootkey1_6(self) -> Reg<u16, RW>
Bits 111:96 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_7(self) -> Reg<u16, RW>
pub const fn bootkey1_7(self) -> Reg<u16, RW>
Bits 127:112 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_8(self) -> Reg<u16, RW>
pub const fn bootkey1_8(self) -> Reg<u16, RW>
Bits 143:128 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_9(self) -> Reg<u16, RW>
pub const fn bootkey1_9(self) -> Reg<u16, RW>
Bits 159:144 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_10(self) -> Reg<u16, RW>
pub const fn bootkey1_10(self) -> Reg<u16, RW>
Bits 175:160 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_11(self) -> Reg<u16, RW>
pub const fn bootkey1_11(self) -> Reg<u16, RW>
Bits 191:176 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_12(self) -> Reg<u16, RW>
pub const fn bootkey1_12(self) -> Reg<u16, RW>
Bits 207:192 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_13(self) -> Reg<u16, RW>
pub const fn bootkey1_13(self) -> Reg<u16, RW>
Bits 223:208 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_14(self) -> Reg<u16, RW>
pub const fn bootkey1_14(self) -> Reg<u16, RW>
Bits 239:224 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey1_15(self) -> Reg<u16, RW>
pub const fn bootkey1_15(self) -> Reg<u16, RW>
Bits 255:240 of SHA-256 hash of boot key 1 (ECC)
sourcepub const fn bootkey2_0(self) -> Reg<u16, RW>
pub const fn bootkey2_0(self) -> Reg<u16, RW>
Bits 15:0 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_1(self) -> Reg<u16, RW>
pub const fn bootkey2_1(self) -> Reg<u16, RW>
Bits 31:16 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_2(self) -> Reg<u16, RW>
pub const fn bootkey2_2(self) -> Reg<u16, RW>
Bits 47:32 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_3(self) -> Reg<u16, RW>
pub const fn bootkey2_3(self) -> Reg<u16, RW>
Bits 63:48 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_4(self) -> Reg<u16, RW>
pub const fn bootkey2_4(self) -> Reg<u16, RW>
Bits 79:64 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_5(self) -> Reg<u16, RW>
pub const fn bootkey2_5(self) -> Reg<u16, RW>
Bits 95:80 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_6(self) -> Reg<u16, RW>
pub const fn bootkey2_6(self) -> Reg<u16, RW>
Bits 111:96 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_7(self) -> Reg<u16, RW>
pub const fn bootkey2_7(self) -> Reg<u16, RW>
Bits 127:112 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_8(self) -> Reg<u16, RW>
pub const fn bootkey2_8(self) -> Reg<u16, RW>
Bits 143:128 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_9(self) -> Reg<u16, RW>
pub const fn bootkey2_9(self) -> Reg<u16, RW>
Bits 159:144 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_10(self) -> Reg<u16, RW>
pub const fn bootkey2_10(self) -> Reg<u16, RW>
Bits 175:160 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_11(self) -> Reg<u16, RW>
pub const fn bootkey2_11(self) -> Reg<u16, RW>
Bits 191:176 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_12(self) -> Reg<u16, RW>
pub const fn bootkey2_12(self) -> Reg<u16, RW>
Bits 207:192 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_13(self) -> Reg<u16, RW>
pub const fn bootkey2_13(self) -> Reg<u16, RW>
Bits 223:208 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_14(self) -> Reg<u16, RW>
pub const fn bootkey2_14(self) -> Reg<u16, RW>
Bits 239:224 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey2_15(self) -> Reg<u16, RW>
pub const fn bootkey2_15(self) -> Reg<u16, RW>
Bits 255:240 of SHA-256 hash of boot key 2 (ECC)
sourcepub const fn bootkey3_0(self) -> Reg<u16, RW>
pub const fn bootkey3_0(self) -> Reg<u16, RW>
Bits 15:0 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_1(self) -> Reg<u16, RW>
pub const fn bootkey3_1(self) -> Reg<u16, RW>
Bits 31:16 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_2(self) -> Reg<u16, RW>
pub const fn bootkey3_2(self) -> Reg<u16, RW>
Bits 47:32 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_3(self) -> Reg<u16, RW>
pub const fn bootkey3_3(self) -> Reg<u16, RW>
Bits 63:48 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_4(self) -> Reg<u16, RW>
pub const fn bootkey3_4(self) -> Reg<u16, RW>
Bits 79:64 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_5(self) -> Reg<u16, RW>
pub const fn bootkey3_5(self) -> Reg<u16, RW>
Bits 95:80 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_6(self) -> Reg<u16, RW>
pub const fn bootkey3_6(self) -> Reg<u16, RW>
Bits 111:96 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_7(self) -> Reg<u16, RW>
pub const fn bootkey3_7(self) -> Reg<u16, RW>
Bits 127:112 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_8(self) -> Reg<u16, RW>
pub const fn bootkey3_8(self) -> Reg<u16, RW>
Bits 143:128 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_9(self) -> Reg<u16, RW>
pub const fn bootkey3_9(self) -> Reg<u16, RW>
Bits 159:144 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_10(self) -> Reg<u16, RW>
pub const fn bootkey3_10(self) -> Reg<u16, RW>
Bits 175:160 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_11(self) -> Reg<u16, RW>
pub const fn bootkey3_11(self) -> Reg<u16, RW>
Bits 191:176 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_12(self) -> Reg<u16, RW>
pub const fn bootkey3_12(self) -> Reg<u16, RW>
Bits 207:192 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_13(self) -> Reg<u16, RW>
pub const fn bootkey3_13(self) -> Reg<u16, RW>
Bits 223:208 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_14(self) -> Reg<u16, RW>
pub const fn bootkey3_14(self) -> Reg<u16, RW>
Bits 239:224 of SHA-256 hash of boot key 3 (ECC)
sourcepub const fn bootkey3_15(self) -> Reg<u16, RW>
pub const fn bootkey3_15(self) -> Reg<u16, RW>
Bits 255:240 of SHA-256 hash of boot key 3 (ECC)
Trait Implementations§
impl Copy for OtpData
impl Eq for OtpData
impl Send for OtpData
impl StructuralPartialEq for OtpData
impl Sync for OtpData
Auto Trait Implementations§
impl Freeze for OtpData
impl RefUnwindSafe for OtpData
impl Unpin for OtpData
impl UnwindSafe for OtpData
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)