Function nvm_read_buffer()

Reads a number of bytes from a page in the NVM memory region.

enum status_code nvm_read_buffer(
		const uint32_t source_address,
		uint8_t *const buffer,
		uint16_t length)

Reads a given number of bytes from a given page address in the NVM memory space into a buffer.

Table 1. Parameters
Data direction Parameter name Description

[in]

source_address

Source page address to read from

[out]

buffer

Pointer to a buffer where the content of the read page will be stored

[in]

length

Number of bytes in the page to read

Returns

Status of the page read attempt.

Table 2. Return Values
Return value Description

STATUS_OK

Requested NVM memory page was successfully read

STATUS_BUSY

NVM controller was busy when the operation was attempted

STATUS_ERR_BAD_ADDRESS

The requested address was outside the acceptable range of the NVM memory region or not aligned to the start of a page

STATUS_ERR_INVALID_ARG

The supplied read length was invalid