pub struct Nvm { /* private fields */ }
Expand description

Non-volatile memory controller

Implementations

Create a new NVM controller or handle failure from DSU

Swap the flash banks. The processor will be reset, after which the inactive bank will become the active bank.

Safety

Ensure there is a working, memory safe program in place in the inactive bank before calling.

Set the power reduction mode

Check if the flash is boot protected

Get first bank

Determine if the controller is busy writing or erasing

Read the user page

Read the calibration area

Read the calibration area for temperatures

Enable/disable boot protection on/off

Userpage’s NVM BOOT field defines a memory region that is supposed to be protected. NVMCTRL.STATUS.BOOTPROT is a readonly HW register populated on reset with a value from a userpage. By default, 0

Write to flash memory from a slice

Safety

If destination_address is not word-aligned, an error is returned.

Using write()

Write to flash memory

Safety

If either destination_address or source_address are not word-aligned, an error is returned.

Writes to flash goes through the NVM controller NVM controller sets the PROGE/LOCKE flag if an error occurs, this is checked in manage_error_states to propagate the relevant error code

Erase flash memory.

Unit of length depends on a chosen erasing granularity.

Safety

Erasing flash goes through the NVM controller NVM controller sets the PROGE/LOCKE flag if an error occurs, this is checked in manage_error_states to propagate the relevant error code.

Retrieve SmartEEPROM

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.