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

SmartEEPROM

Structs

POD-style struct representing NVM calibration area
Non-volatile memory controller
POD-style struct representing NVM calibration area for temperature calibration
POD-style struct representing NVM user page

Enums

Flash banks identified by which one we boot from.
Data erased per command
Driver errors
Power Reduction Mode during Sleep
Errors generated by the NVM peripheral
Physical flash banks

Constants

Size of one block
Size of a page in bytes

Functions

Retrieve a bank size using HW registers
Retrieve a total NVM size using HW registers

Type Definitions

NVM result type