2.70 Non-Volatile Memory Controller (NVMCTRL)

This Plib implements software abstraction for NVMCTRL Peripheral.

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

Library Interface

Non-Volatile Memory Controller peripheral library provides the following interfaces:

Functions

NameDescription
NVMCTRL_InitializeInitializes given instance of the NVMCTRL peripheral
NVMCTRL_ReadReads length number of bytes from a given address in FLASH memory
NVMCTRL_SetWriteModeSets the write mode for Flash
NVMCTRL_PageWriteWrites one page of data to given NVM address
NVMCTRL_BlockEraseErases a Block in the NVM
NVMCTRL_RowEraseErases a Row in the NVM
NVMCTRL_ErrorGetReturns the error state of NVM controller
NVMCTRL_StatusGetReturns status conditions of NVM controller
NVMCTRL_IsBusyReturns the current status of NVM controller
NVMCTRL_RegionLockLocks a NVMCTRL region
NVMCTRL_RegionUnlockUnlocks a NVM region
NVMCTRL_RegionLockStatusGetReturns the value of RUNLOCK register
NVMCTRL_SecureRegionLockLocks a NVMCTRL secure region
NVMCTRL_SecureRegionUnlockUnlocks a NVMCTRL secure region
NVMCTRL_DataScrambleEnableEnable or Disable data scrambling of the Secure Data Flash
NVMCTRL_DataScrambleKeySetSets the key for data scrambling of the Secure Data Flash
NVMCTRL_RWWEEPROM_ReadReads length number of bytes from a given address in Data FLASH memory
NVMCTRL_RWWEEPROM_PageWriteWrites one page of data to given RWWEEPROM address
NVMCTRL_RWWEEPROM_RowEraseErases a Row in the RWWEEPROM
NVMCTRL_DATA_FLASH_ReadReads length number of bytes from a given address in Data FLASH memory
NVMCTRL_DATA_FLASH_PageWriteWrites one page of data to given DATA_FLASH address
NVMCTRL_DATA_FLASH_RowEraseErases a Row in the DATA_FLASH
NVMCTRL_BankSwapSwaps NVM Banks
NVMCTRL_MainCallbackRegisterSets the pointer to the function (and it's context) to be called when an operation on the Flash is complete, provided the corresponding interrupt is enabled
NVMCTRL_SmartEEPROM_IsBusyChecks whether SmartEEPROM is ready to perform next command
NVMCTRL_SmartEepromStatusGetReturns status conditions of SmartEEPROM
NVMCTRL_SmartEEPROM_IsActiveSectorFullCheck whether active sector used by the SmartEEPROM is full
NVMCTRL_SmartEepromSectorReallocatePerforms sector reallocation for the SmartEEPROM
NVMCTRL_SmartEepromFlushPageBufferFlush SmartEEPROM data when in buffered mode
NVMCTRL_SmartEEPROMCallbackRegisterSets the pointer to the function (and it's context) to be called when an operation on the SmartEEPROM is complete, provided the corresponding interrupt is enabled
NVMCTRL_EnableMainFlashInterruptSourceEnables a given interrupt source for the Flash
NVMCTRL_DisableMainFlashInterruptSourceDisables a given interrupt source for the Flash
NVMCTRL_EnableSmartEepromInterruptSourceEnables a given interrupt source for the SmartEEPROM
NVMCTRL_DisableSmartEepromInterruptSourceDisables a given interrupt source for the SmartEEPROM
NVMCTRL_CallbackRegisterSets the pointer to the function (and it's context) to be called when the operation is complete
NVMCTRL_CacheInvalidateInvalidates all cache lines
NVMCTRL_PageBufferWriteWrites data to the internal buffer of NVM known as the page buffer
NVMCTRL_PageBufferCommitCommits the data present in NVM internal page buffer to flash memory

Data types and constants

NameTypeDescription
NVMCTRL_FLASH_START_ADDRESSMacroDefines the start address of NVMCTRL Flash
NVMCTRL_FLASH_SIZEMacroDefines the size (in bytes) of Flash
NVMCTRL_FLASH_PAGESIZEMacroDefines the size (in bytes) of a NVMCTRL Page
NVMCTRL_FLASH_BLOCKSIZEMacroDefines the size (in bytes) of a NVMCTRL Block
NVMCTRL_FLASH_ROWSIZEMacroDefines the size (in bytes) of a NVMCTRL Row
NVMCTRL_DATA_FLASH_START_ADDRESSMacroDefines the start address of NVMCTRL DATA_FLASH
NVMCTRL_DATA_FLASH_SIZEMacroDefines the size (in bytes) of DATA_FLASH
NVMCTRL_DATA_FLASH_PAGESIZEMacroDefines the size (in bytes) of a NVMCTRL DATA_FLASH Page
NVMCTRL_DATA_FLASH_ROWSIZEMacroDefines the size (in bytes) of a NVMCTRL DATA_FLASH Row
NVMCTRL_RWWEEPROM_START_ADDRESSMacroDefines the start address of NVMCTRL RWWEEPROM
NVMCTRL_RWWEEPROM_SIZEMacroDefines the size (in bytes) of RWWEEPROM
NVMCTRL_RWWEEPROM_PAGESIZEMacroDefines the size (in bytes) of a NVMCTRL RWWEEPROM Page
NVMCTRL_RWWEEPROM_ROWSIZEMacroDefines the size (in bytes) of a NVMCTRL RWWEEPROM Row
NVMCTRL_ERRORMacroDefines the NVMCTRL Error Type
NVMCTRL_WRITEMODEEnumDefines the NVMCTRL Write Modes
NVMCTRL_INTERRUPT0_SOURCEEnumDefines the Interrupt sources for the main flash
NVMCTRL_INTERRUPT1_SOURCEEnumDefines the Interrupt sources for the SmartEEPROM
NVMCTRL_MEMORY_REGIONEnumDefines the NVMCTRL Memory Region
NVMCTRL_SECURE_MEMORY_REGIONEnumDefines the NVMCTRL Secure Memory Region
NVMCTRL_CALLBACKTypedefDefines the data type and function signature for the NVMCTRL peripheral callback function