Expand description
§Non-volatile Memory Controller
This module allows users to interact with non-volatile memory controller.
Nvmctrl is an intermediary between memory buses and physical non-volatile
memory. It provides means of managing a flash memory content, its properties
(cache, wait states, bootloader blocks protection), power management and
address remapping if necessary (in case bank mechanism is used). It also
provides an indirection mechanism to achieve non-volatile RAM-like memory
within last sectors of a physical flash (More in smart_eeprom
module).
NVM supports splitting flash into two sections (opt-in feature) called
banks. Bank considered active is mapped to virtual address 0x0
, meaning
it contains currently executed application. Through NVM command & control
interface, banks can be swapped and MCU reset, so the firmware from the
other bank will run after restart.
Module features:
- Erase & write over non-volatile memory in a device.
- Swap banks
Modules§
- smart_
eeprom - SmartEEPROM
Structs§
- Calibration
Area - POD-style struct representing NVM calibration area
- Nvm
- Non-volatile memory controller
- RawUserpage
- Raw userpage POD struct that exposes bitfields via methods
- Temperatures
Calibration Area - POD-style struct representing NVM calibration area for temperature calibration
Enums§
- Bank
- Flash banks identified by which one we boot from.
- Error
- Driver errors
- Peripheral
Error - Errors generated by the NVM peripheral
- Physical
Bank - Physical flash banks
- Prmselect
- Power Reduction Mode during Sleep
- Userpage
Status - The outcome of
Nvm::modify_userpage
- Write
Granularity - Data written per command
Constants§
- BLOCKSIZE
- Size of one block
- PAGESIZE
- Size of a page in bytes
- QUADWORDSIZE
- Size of a quad word
Functions§
- retrieve_
bank_ size - Retrieve a bank size using HW registers
- retrieve_
flash_ size - Retrieve a total NVM size using HW registers