2.73 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
| Name | Description |
|---|---|
| NVMCTRL_Initialize | Initializes given instance of the NVMCTRL peripheral |
| NVMCTRL_Read | Reads length number of bytes from a given address in FLASH memory |
| NVMCTRL_SetWriteMode | Sets the write mode for Flash |
| NVMCTRL_PageWrite | Writes one page of data to given NVM address |
| NVMCTRL_BlockErase | Erases a Block in the NVM |
| NVMCTRL_RowErase | Erases a Row in the NVM |
| NVMCTRL_ErrorGet | Returns the error state of NVM controller |
| NVMCTRL_StatusGet | Returns status conditions of NVM controller |
| NVMCTRL_IsBusy | Returns the current status of NVM controller |
| NVMCTRL_RegionLock | Locks a NVMCTRL region |
| NVMCTRL_RegionUnlock | Unlocks a NVM region |
| NVMCTRL_RegionLockStatusGet | Returns the value of RUNLOCK register |
| NVMCTRL_SecureRegionLock | Locks a NVMCTRL secure region |
| NVMCTRL_SecureRegionUnlock | Unlocks a NVMCTRL secure region |
| NVMCTRL_DataScrambleEnable | Enable or Disable data scrambling of the Secure Data Flash |
| NVMCTRL_DataScrambleKeySet | Sets the key for data scrambling of the Secure Data Flash |
| NVMCTRL_RWWEEPROM_Read | Reads length number of bytes from a given address in Data FLASH memory |
| NVMCTRL_RWWEEPROM_PageWrite | Writes one page of data to given RWWEEPROM address |
| NVMCTRL_RWWEEPROM_RowErase | Erases a Row in the RWWEEPROM |
| NVMCTRL_DATA_FLASH_Read | Reads length number of bytes from a given address in Data FLASH memory |
| NVMCTRL_DATA_FLASH_PageWrite | Writes one page of data to given DATA_FLASH address |
| NVMCTRL_DATA_FLASH_RowErase | Erases a Row in the DATA_FLASH |
| NVMCTRL_BankSwap | Swaps NVM Banks |
| NVMCTRL_MainCallbackRegister | Sets 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_IsBusy | Checks whether SmartEEPROM is ready to perform next command |
| NVMCTRL_SmartEepromStatusGet | Returns status conditions of SmartEEPROM |
| NVMCTRL_SmartEEPROM_IsActiveSectorFull | Check whether active sector used by the SmartEEPROM is full |
| NVMCTRL_SmartEepromSectorReallocate | Performs sector reallocation for the SmartEEPROM |
| NVMCTRL_SmartEepromFlushPageBuffer | Flush SmartEEPROM data when in buffered mode |
| NVMCTRL_SmartEEPROMCallbackRegister | Sets 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_EnableMainFlashInterruptSource | Enables a given interrupt source for the Flash |
| NVMCTRL_DisableMainFlashInterruptSource | Disables a given interrupt source for the Flash |
| NVMCTRL_EnableSmartEepromInterruptSource | Enables a given interrupt source for the SmartEEPROM |
| NVMCTRL_DisableSmartEepromInterruptSource | Disables a given interrupt source for the SmartEEPROM |
| NVMCTRL_CallbackRegister | Sets the pointer to the function (and it's context) to be called when the operation is complete |
| NVMCTRL_CacheInvalidate | Invalidates all cache lines |
| NVMCTRL_PageBufferWrite | Writes data to the internal buffer of NVM known as the page buffer |
| NVMCTRL_PageBufferCommit | Commits the data present in NVM internal page buffer to flash memory |
Data types and constants
| Name | Type | Description |
|---|---|---|
| NVMCTRL_FLASH_START_ADDRESS | Macro | Defines the start address of NVMCTRL Flash |
| NVMCTRL_FLASH_SIZE | Macro | Defines the size (in bytes) of Flash |
| NVMCTRL_FLASH_PAGESIZE | Macro | Defines the size (in bytes) of a NVMCTRL Page |
| NVMCTRL_FLASH_BLOCKSIZE | Macro | Defines the size (in bytes) of a NVMCTRL Block |
| NVMCTRL_FLASH_ROWSIZE | Macro | Defines the size (in bytes) of a NVMCTRL Row |
| NVMCTRL_DATA_FLASH_START_ADDRESS | Macro | Defines the start address of NVMCTRL DATA_FLASH |
| NVMCTRL_DATA_FLASH_SIZE | Macro | Defines the size (in bytes) of DATA_FLASH |
| NVMCTRL_DATA_FLASH_PAGESIZE | Macro | Defines the size (in bytes) of a NVMCTRL DATA_FLASH Page |
| NVMCTRL_DATA_FLASH_ROWSIZE | Macro | Defines the size (in bytes) of a NVMCTRL DATA_FLASH Row |
| NVMCTRL_RWWEEPROM_START_ADDRESS | Macro | Defines the start address of NVMCTRL RWWEEPROM |
| NVMCTRL_RWWEEPROM_SIZE | Macro | Defines the size (in bytes) of RWWEEPROM |
| NVMCTRL_RWWEEPROM_PAGESIZE | Macro | Defines the size (in bytes) of a NVMCTRL RWWEEPROM Page |
| NVMCTRL_RWWEEPROM_ROWSIZE | Macro | Defines the size (in bytes) of a NVMCTRL RWWEEPROM Row |
| NVMCTRL_ERROR | Macro | Defines the NVMCTRL Error Type |
| NVMCTRL_WRITEMODE | Enum | Defines the NVMCTRL Write Modes |
| NVMCTRL_INTERRUPT0_SOURCE | Enum | Defines the Interrupt sources for the main flash |
| NVMCTRL_INTERRUPT1_SOURCE | Enum | Defines the Interrupt sources for the SmartEEPROM |
| NVMCTRL_MEMORY_REGION | Enum | Defines the NVMCTRL Memory Region |
| NVMCTRL_SECURE_MEMORY_REGION | Enum | Defines the NVMCTRL Secure Memory Region |
| NVMCTRL_CALLBACK | Typedef | Defines the data type and function signature for the NVMCTRL peripheral callback function |
