Non-Volatile Memory, Third Generation (NVM3)#

About This Guide#

This guide introduces the Non-Volatile Memory, Third Generation (NVM3) driver and explains how to use it to store persistent data in flash memory on the SiWx917 device.

NVM3 provides a reliable, wear-leveled, and fault-tolerant storage mechanism for configuration parameters, counters, and other data that must be retained across resets or power cycles.

The NVM3 driver is supported on SiWx917 (Wi-Fi 6 + Bluetooth LE 5.4) and supports applications developed using the WiSeConnect SDK.

It can be used in both wireless applications (Wi-Fi, Bluetooth LE, and Matter) and standalone MCU applications that require persistent flash storage.

Audience#

This guide is intended for firmware and application engineers developing SiWx917-based embedded systems that require persistent data storage using the NVM3 driver.

Purpose#

The purpose of this guide is to help developers understand and implement NVM3 storage on the SiWx917 platform.
It explains how to configure, initialize, and use the NVM3 driver to store, update, and retrieve persistent application data reliably from on-chip flash memory.

Scope#

This document covers the NVM3 (Non-Volatile Memory, Third Generation) driver implementation for the SiWx917 SoC.

It describes how to configure, initialize, and manage flash-based persistent storage within the WiSeConnect SDK environment.

This guide includes:

  • Overview of NVM3 architecture and object storage model

  • Integration of NVM3 with SiWx917 application firmware

  • Management of flash pages, wear leveling, and power-fail recovery

  • Implementation examples for Wi-Fi, Bluetooth LE, and Matter use cases on SiWx917

Note: This guide does not describe low-level flash controller operations or electrical specifications.

For such details, refer to the SiWx917 Family Reference Manual and SiWx917 Data sheet. NVM3 driver depends on the Quad Serial Peripheral Interface (QSPI) controller to read from and write to Flash memory. The QSPI controller is only available in the PS4 and PS3 power states.

Main Features#

The NVM3 driver on SiWx917 provides a flexible, reliable, and power-efficient method for storing persistent data in internal flash memory.

Key features include:

  • Key–value object storage: Stores data as variable-length objects indexed by unique keys.

  • Dynamic allocation: Objects can be created, updated, or deleted at runtime without recompilation.

  • Power-fail recovery: Ensures data integrity during unexpected resets or power loss by committing only complete writes.

  • Flash wear leveling: Automatically distributes erase and write operations across flash pages to extend flash endurance.

  • Configurable object and page sizes: Supports object sizes up to 4 KB and storage regions spanning multiple flash pages (minimum three pages recommended).

  • Software cache (optional): Accelerates access to frequently read objects using a RAM cache.

  • Data and counter objects: Supports both general-purpose data storage and monotonic counters for usage tracking.

  • Multiprotocol compatibility: Enables shared, centralized storage across Wi-Fi, Bluetooth LE, and Matter stacks on the SiWx917 device.

  • API compatibility: Integrates with Persistent Storage Manager (PSM), Token, and PS Store frameworks for higher-level storage management.

  • Repack and maintenance API: Performs background flash cleanup and page compaction during idle CPU cycles to maintain optimal performance.

Summary#

The NVM3 driver for SiWx917 provides a robust, wear-leveled, and fault-tolerant solution for storing persistent application data in flash memory.

It ensures data reliability, supports multiprotocol use, and enables power-fail-safe operation across all communication stacks on the SiWx917 platform.