Function nvm_execute_command()

Executes a command on the NVM controller.

enum status_code nvm_execute_command(
		const enum nvm_command command,
		const uint32_t address,
		const uint32_t parameter)

Executes an asynchronous command on the NVM controller, to perform a requested action such as a NVM page read or write operation.

Note: The function will return before the execution of the given command is completed.
Table 1. Parameters
Data direction Parameter name Description

[in]

command

Command to issue to the NVM controller

[in]

address

Address to pass to the NVM controller in NVM memory space

[in]

parameter

Parameter to pass to the NVM controller, not used for this driver

Returns

Status of the attempt to execute a command.

Table 2. Return Values
Return value Description

STATUS_OK

If the command was accepted and execution is now in progress

STATUS_BUSY

If the NVM controller was already busy executing a command when the new command was issued

STATUS_ERR_IO

If the command was invalid due to memory or security locking

STATUS_ERR_INVALID_ARG

If the given command was invalid or unsupported

STATUS_ERR_BAD_ADDRESS

If the given address was invalid