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 1. Parameters
Data direction Parameter name Description

[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 2. Return Values
Return value Description

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