10.8.1.1.3 Workflow

  1. Create an NVM module configuration struct, which can be filled out to adjust the configuration of the NVM controller.
    struct nvm_config config_nvm;
    
  2. Initialize the NVM configuration struct with the module's default values.
    nvm_get_config_defaults(&config_nvm);
    
    Note: This should always be performed before using the configuration struct to ensure that all values are initialized to known default settings.
  3. Enable automatic page write mode. The new data will be written to NVM automaticly.
    config_nvm.manual_page_write = false;
    
    Note: If automatic page write mode is disabled, the data will not write to NVM until the NVM write command has been invoked. For safe use of the NVM module, disable automatic page write mode and use write command to commit data is recommended.
  4. Configure NVM controller with the created configuration struct settings.
    nvm_set_config(&config_nvm);