2.69 Non-Volatile Memory (NVM)

This Plib implements software abstraction for NVM Peripheral.

Note: Not all APIs maybe implemented. See the specific device family section for available APIs.

Library Interface

Non-Volatile Memory peripheral library provides the following interfaces:

Functions

NameDescription
NVM_InitializeInitializes given instance of the NVM peripheral
NVM_ReadReads length number of bytes from a given address in FLASH memory
NVM_RowWriteWrites one row of data to given NVM address
NVM_SingleDoubleWordWriteWrites Two Words into the Flash
NVM_QuadDoubleWordWriteWrites Eight Words into the Flash
NVM_DoubleWordWriteWrites two words into the Flash
NVM_WordWriteWrites One word into the Flash
NVM_QuadWordWriteWrites four words into the Flash
NVM_PageEraseErases a Page in the NVM
NVM_ErrorGetReturns the error state of NVM controller
NVM_IsBusyReturns the current status of NVM controller
NVM_CallbackRegisterSets the pointer to the function (and it's context) to be called when the operation is complete
NVM_ProgramFlashSwapBankSwaps the Program Flash Bank 2
NVM_ProgramFlashWriteProtectProtect Program Flash Memory from Writes
NVM_ProgramFlashWriteProtectLockDisable Writes to Program Flash Write Protect Lock register
NVM_BootFlashWriteProtectEnableProtect Boot Flash Memory Page from Writes
NVM_BootFlashWriteProtectDisableUn-Protect Boot Flash Memory Page to perform Writes
NVM_BootFlashWriteProtectLockDisable Writes to Boot flash Write Protect Lock register

Data types and constants

NameTypeDescription
NVM_ERROREnumDefines the NVM Error Type
NVM_BOOT_FLASH_WRITE_PROTECTEnumDefines the Boot flash write protect pages
NVM_BOOT_FLASH_WRITE_PROTECT_LOCKEnumDefines the Write protect lock pages
NVM_CALLBACKTypedefDefines the data type and function signature for the NVM peripheral callback function