10.6.3.1.2 Function nvm_set_config()

Sets the up the NVM hardware module based on the configuration.

enum status_code nvm_set_config( const struct nvm_config *const config)

Writes a given configuration of a NVM controller configuration to the hardware module, and initializes the internal device struct.

Table 10-5. Parameters
Data directionParameter nameDescription

[in]

config

Configuration settings for the NVM controller

Note: The security bit must be cleared in order successfully use this function. This can only be done by a chip erase.

Returns

Status of the configuration procedure.

Table 10-6. Return Values
Return valueDescription

STATUS_OK

If the initialization was a success

STATUS_BUSY

If the module was busy when the operation was attempted

STATUS_ERR_IO

If the security bit has been set, preventing the EEPROM and/or auxiliary space configuration from being altered