10.6.3.2.6 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 10-17. Parameters
Data directionParameter nameDescription

[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 10-18. Return Values
Return valueDescription

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