![]() |
![]() |
MSPM0L111X Driver Library
2.05.00.05
|
![]() |
Modules | |
DL_FLASHCTL_INTERRUPT | |
DL_FLASHCTL_COMMAND_TYPE | |
Macros | |
#define | DEVICE_HAS_FLASH_128_BIT_WORD |
Device has 128 bit flash word width. | |
#define | DEVICE_HAS_NO_CMDWEPROTA |
Device does not have CMDWEPROTA. | |
#define | FLASHCTL_BANK0_ADDRESS (0x00000000) |
Address for Bank 0. | |
#define | FLASHCTL_MAIN_ADDRESS (0x00000000) |
Address for MAIN memory region. | |
#define | FLASHCTL_NONMAIN_ADDRESS (0x41c00000) |
Address for NONMAIN memory region. | |
#define | NUMBER_OF_NONMAIN_SECTORS (1) |
Number of NONMAIN sectors. | |
#define | FLASHCTL_DATA_ADDRESS (0x41d00000) |
Address for DATA memory region. | |
#define | DL_FLASHCTL_PROGRAM_8_WITHOUT_ECC (0x00000001) |
Enable programming 8 bits without ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_16_WITHOUT_ECC (0x00000003) |
Enable programming 16 bits without ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_32_WITHOUT_ECC (0x0000000F) |
Enable programming 32 bits without ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_64_WITHOUT_ECC (0x000000FF) |
Enable programming 64 bits without ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_8_WITH_ECC (0x00000101) |
Enable programming 8 bits with ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_16_WITH_ECC (0x00000103) |
Enable programming 16 bits with ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_32_WITH_ECC (0x0000010F) |
Enable programming 32 bits with ECC enabled. | |
#define | DL_FLASHCTL_PROGRAM_64_WITH_ECC (0x000001FF) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_8_WITHOUT_ECC (0x00000001) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_16_WITHOUT_ECC (0x00000003) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_32_WITHOUT_ECC (0x0000000F) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_64_WITHOUT_ECC (0x000000FF) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_8_WITH_ECC (0x00000101) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_16_WITH_ECC (0x00000103) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_32_WITH_ECC (0x0000010F) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_READ_VERIFY_64_WITH_ECC (0x000001FF) |
Enable programming 64 bits with ECC enabled. | |
#define | DL_FLASHCTL_SECTOR_SIZE (1024) |
Size of one flash sector. | |
Functions | |
__STATIC_INLINE void | DL_FlashCTL_enableInterrupt (FLASHCTL_Regs *flashctl) |
Enable flash interrupt. More... | |
__STATIC_INLINE void | DL_FlashCTL_disableInterrupt (FLASHCTL_Regs *flashctl) |
Disable flash interrupt. More... | |
__STATIC_INLINE bool | DL_FlashCTL_isInterruptEnabled (const FLASHCTL_Regs *flashctl) |
Check if the flash interrupt is enabled. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getEnabledInterruptStatus (const FLASHCTL_Regs *flashctl) |
Check interrupt flag of enabled flash interrupt. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getRawInterruptStatus (const FLASHCTL_Regs *flashctl) |
Check interrupt flag of the flash interrupt. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getPendingInterrupt (const FLASHCTL_Regs *flashctl) |
Get highest priority pending flash interrupt. More... | |
__STATIC_INLINE void | DL_FlashCTL_clearInterruptStatus (FLASHCTL_Regs *flashctl) |
Clear pending flash interrupt. More... | |
__STATIC_INLINE bool | DL_FlashCTL_isCommandExecuted (const FLASHCTL_Regs *flashctl) |
Checks if a command execution has been initiated. More... | |
__STATIC_INLINE void | DL_FlashCTL_setCommandExecute (FLASHCTL_Regs *flashctl) |
Initiates a command execution. More... | |
__STATIC_INLINE void | DL_FlashCTL_disbleStairStepErase (FLASHCTL_Regs *flashctl) |
Disable Stair-Step Erase. More... | |
__STATIC_INLINE bool | DL_FlashCTL_isStairStepEraseDisabled (const FLASHCTL_Regs *flashctl) |
Checks if stair-step erase is disabled. More... | |
__STATIC_INLINE void | DL_FlashCTL_enableStairStepErase (FLASHCTL_Regs *flashctl) |
Enable Stair-Step Erase. More... | |
__STATIC_INLINE void | DL_FlashCTL_enableAddressOverrideMode (FLASHCTL_Regs *flashctl) |
Enable address override mode. More... | |
__STATIC_INLINE bool | DL_FlashCTL_isAddressOverrideModeEnabled (const FLASHCTL_Regs *flashctl) |
Checks if address override mode is enabled. More... | |
__STATIC_INLINE void | DL_FlashCTL_disableAddressOverrideMode (FLASHCTL_Regs *flashctl) |
Disable address override mode. More... | |
__STATIC_INLINE void | DL_FlashCTL_enableOverrideHardwareGeneratedECC (FLASHCTL_Regs *flashctl) |
Enable overriding hardware generation of ECC code. More... | |
__STATIC_INLINE bool | DL_FlashCTL_isOverrideHardwareGeneratedECCEnabled (const FLASHCTL_Regs *flashctl) |
Checks if overriding hardware generation of ECC code is enabled. More... | |
__STATIC_INLINE void | DL_FlashCTL_disableOverrideHardwareGeneratedECC (FLASHCTL_Regs *flashctl) |
Disable overriding hardware generation of ECC code. More... | |
__STATIC_INLINE void | DL_FlashCTL_setRegionSelect (FLASHCTL_Regs *flashctl, DL_FLASHCTL_REGION_SELECT region) |
Set the region select. More... | |
__STATIC_INLINE DL_FLASHCTL_REGION_SELECT | DL_FlashCTL_getRegionSelect (const FLASHCTL_Regs *flashctl) |
Get the region select. More... | |
__STATIC_INLINE void | DL_FlashCTL_setBankSelect (FLASHCTL_Regs *flashctl, DL_FLASHCTL_BANK_SELECT bank) |
Set the bank select. More... | |
__STATIC_INLINE DL_FLASHCTL_BANK_SELECT | DL_FlashCTL_getBankSelect (const FLASHCTL_Regs *flashctl) |
Get the bank select. More... | |
__STATIC_INLINE void | DL_FlashCTL_setCommandByteEnable (FLASHCTL_Regs *flashctl, uint32_t byteMask) |
Set the bytes to enable for programming data. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getCommandByteEnable (const FLASHCTL_Regs *flashctl) |
Get the bytes that are enabled for programming data. More... | |
__STATIC_INLINE void | DL_FlashCTL_setCommandData (FLASHCTL_Regs *flashctl, uint8_t index, const uint32_t *data) |
Set the data for a command data register. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getCommandData (FLASHCTL_Regs *flashctl, uint8_t index) |
Get the data from a command data register. More... | |
__STATIC_INLINE void | DL_FlashCTL_setCommandDataECC (FLASHCTL_Regs *flashctl, uint8_t index, const uint8_t *data) |
Set the ECC code in the command data ECC register. More... | |
__STATIC_INLINE uint8_t | DL_FlashCTL_getCommandDataECC (FLASHCTL_Regs *flashctl, uint8_t index) |
Get the ECC code in the command data ECC register. More... | |
__STATIC_INLINE void | DL_FlashCTL_setCommandAddress (FLASHCTL_Regs *flashctl, uint32_t address) |
Sets the target address for a command. More... | |
__STATIC_INLINE DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_getCommandStatus (const FLASHCTL_Regs *flashctl) |
Returns the status of the current command. More... | |
__STATIC_INLINE DL_FLASHCTL_FAIL_TYPE | DL_FlashCTL_getFailureStatus (const FLASHCTL_Regs *flashctl) |
Returns the reason a command failed. More... | |
__STATIC_INLINE bool | DL_FlashCTL_waitForCmdDone (const FLASHCTL_Regs *flashctl) |
Blocking function that waits for a command execution to finish. More... | |
__STATIC_INLINE void | DL_FlashCTL_executeClearStatus (FLASHCTL_Regs *flashctl) |
Sets clear status bit and executes command. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getFlashSectorNumber (FLASHCTL_Regs *flashctl, uint32_t addr) |
Gets the sector number of the input address over the whole memory map. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getFlashSectorNumberInBank (FLASHCTL_Regs *flashctl, uint32_t addr) |
Gets the sector number of the input address relative to the bank of the address. More... | |
__STATIC_INLINE void | DL_FlashCTL_setWaitState (FLASHCTL_Regs *flashctl, uint32_t waitState) |
Set the number of wait states used by the Flash. More... | |
__STATIC_INLINE uint32_t | DL_FlashCTL_getWaitState (const FLASHCTL_Regs *flashctl) |
Get the number of wait states used by the Flash. More... | |
void | DL_FlashCTL_eraseMemory (FLASHCTL_Regs *flashctl, uint32_t address, DL_FLASHCTL_COMMAND_SIZE memorySize) |
Performs an erase on unprotected memory. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_eraseMemoryFromRAM (FLASHCTL_Regs *flashctl, uint32_t address, DL_FLASHCTL_COMMAND_SIZE memorySize) |
Performs an erase on unprotected memory, and executes command from RAM. More... | |
bool | DL_FlashCTL_massErase (FLASHCTL_Regs *flashctl) |
Performs a mass erase on main memory on one bank. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_massEraseFromRAM (FLASHCTL_Regs *flashctl) |
Performs a mass erase on main memory, and executes command from RAM. More... | |
bool | DL_FlashCTL_massEraseMultiBank (FLASHCTL_Regs *flashctl) |
Performs a mass erase on main memory, and erases all flash banks. More... | |
bool | DL_FlashCTL_factoryReset (FLASHCTL_Regs *flashctl) |
Performs a factory reset erase on main and non-main memory. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_factoryResetFromRAM (FLASHCTL_Regs *flashctl) |
Performs a factory reset erase on main and non-main memory, and executes command from RAM. More... | |
bool | DL_FlashCTL_factoryResetMultiBank (FLASHCTL_Regs *flashctl) |
Performs a factory reset erase on main and non-main memory. More... | |
void | DL_FlashCTL_programMemory8 (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Programs 8 bit data to unprotected memory at the given address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM8 (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Programs 8 bit data to unprotected memory at the given address, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory16 (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Programs 16 bit data to unprotected memory at the given address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM16 (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Programs 16 bit data to unprotected memory at the given address, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory32 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 32 bit data to unprotected memory at the given address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM32 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 32 bit data to unprotected memory at the given address, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory64 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 64 bit data to unprotected memory at the given address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM64 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 64 bit data to unprotected memory at the given address, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory8WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Programs 8 bit data with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM8WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Programs 8 bit data with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory16WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Programs 16 bit data with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM16WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Programs 16 bit data with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory32WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 32 bit data with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM32WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 32 bit data with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory64WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 64 bit data with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM64WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 64 bit data with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory8WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode) |
Programs 8 bit data with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM8WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode) |
Programs 8 bit data with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory16WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode) |
Programs 16 bit data with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM16WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode) |
Programs 16 bit data with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory32WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Programs 32 bit data with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM32WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Programs 32 bit data with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory64WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Programs 64 bit data with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM64WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Programs 64 bit data with user provided ECC code, and executes command from RAM. More... | |
bool | DL_FlashCTL_programMemoryBlocking64WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryBlockingFromRAM64WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data with hardware generated ECC code, and executes command from RAM. More... | |
bool | DL_FlashCTL_programMemoryBlocking64WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint8_t *eccCode, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryBlockingFromRAM64WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint8_t *eccCode, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data with user provided ECC code, and executes command from RAM. More... | |
bool | DL_FlashCTL_programMemoryBlocking (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data to unprotected memory at a given address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_programMemoryFromRAM (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data to unprotected memory at a given address, and executes command from RAM. More... | |
void | DL_FlashCTL_unprotectMainMemory (FLASHCTL_Regs *flashctl) |
Unprotects all main memory from erase/program. More... | |
void | DL_FlashCTL_unprotectDataMemory (FLASHCTL_Regs *flashctl) |
Unprotects all data memory from erase/program. More... | |
void | DL_FlashCTL_protectMainMemory (FLASHCTL_Regs *flashctl) |
Protects all main memory from erase/program. More... | |
void | DL_FlashCTL_unprotectNonMainMemory (FLASHCTL_Regs *flashctl) |
Unprotects all non-main memory from erase/program. More... | |
void | DL_FlashCTL_protectNonMainMemory (FLASHCTL_Regs *flashctl) |
Protects all non-main memory from erase/program. More... | |
void | DL_FlashCTL_unprotectAllMemory (FLASHCTL_Regs *flashctl) |
Unprotects all user memory from erase/program. More... | |
void | DL_FlashCTL_protectAllMemory (FLASHCTL_Regs *flashctl) |
Protects all user memory from erase/program. More... | |
void | DL_FlashCTL_unprotectSector (FLASHCTL_Regs *flashctl, uint32_t addr, DL_FLASHCTL_REGION_SELECT regionSelect) |
Sets a given sector to unprotected from erase/program. More... | |
void | DL_FlashCTL_protectSector (FLASHCTL_Regs *flashctl, uint32_t addr, DL_FLASHCTL_REGION_SELECT regionSelect) |
Sets a given sector to protected from erase/program. More... | |
void | DL_FlashCTL_readVerify8 (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Verifies 8-bit data in specified address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM8 (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Verifies 8-bit data in specified address, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify16 (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Verifies 16-bit data in specified address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM16 (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Verifies 16-bit data in specified address, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify32 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 32-bit data in specified address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM32 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 32-bit data in specified address, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify64 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 64-bit data in specified address. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM64 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 64-bit data in specified address, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify8WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Verifies 8-bit data in specified address with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM8WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data) |
Verifies 8-bit data in specified address with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify16WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Verifies 16-bit data in specified address with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM16WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data) |
Verifies 16-bit data in specified address with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify32WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 32-bit data in specified address with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM32WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 32-bit data in specified address with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify64WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 64-bit data in specified address with hardware generated ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM64WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Verifies 32-bit data in specified address with hardware generated ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify8WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode) |
Verifies 8-bit data in specified address with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM8WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint8_t *data, const uint8_t *eccCode) |
Verifies 8-bit data in specified address with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify16WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode) |
Verifies 16-bit data in specified address with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM16WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint16_t *data, const uint8_t *eccCode) |
Verifies 16-bit data in specified address with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify32WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Verifies 32-bit data in specified address with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM32WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Verifies 32-bit data in specified address with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_readVerify64WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Verifies 64-bit data in specified address with user provided ECC code. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_readVerifyFromRAM64WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Verifies 64-bit data in specified address with user provided ECC code, and executes command from RAM. More... | |
void | DL_FlashCTL_blankVerify (FLASHCTL_Regs *flashctl, uint32_t address) |
Verifies that a flash word is blank. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_blankVerifyFromRAM (FLASHCTL_Regs *flashctl, uint32_t address) |
Verifies that a flash word is blank, and executes command from RAM. More... | |
void | DL_FlashCTL_programMemory128 (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 128 bit data to unprotected memory at the given address. More... | |
void | DL_FlashCTL_programMemory128WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data) |
Programs 128 bit data with hardware generated ECC code. More... | |
void | DL_FlashCTL_programMemory128WithECCManual (FLASHCTL_Regs *flashctl, uint32_t address, const uint32_t *data, const uint8_t *eccCode) |
Programs 128 bit data with hardware generated ECC code. More... | |
bool | DL_FlashCTL_programMemoryBlocking128WithECCGenerated (FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) |
Programs provided data up to 128-bits with ECC generated while blocking between writes. More... | |
bool | DL_FlashCTL_eraseDataBank (FLASHCTL_Regs *flashctl) |
Performs an erase on DATA bank. More... | |
DL_FLASHCTL_COMMAND_STATUS | DL_FlashCTL_eraseDataBankFromRAM (FLASHCTL_Regs *flashctl) |
Performs an erase on DATA bank, and executes command from RAM. More... | |
The Flash Controller Driver Library allows full configuration of the MSPM0 Non-Volatile memory system. The non-volatile memory (NVM) system provides nonvolatile flash memory for storing executable code and data.
enum DL_FLASHCTL_IIDX |
__STATIC_INLINE void DL_FlashCTL_enableInterrupt | ( | FLASHCTL_Regs * | flashctl | ) |
Enable flash interrupt.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_disableInterrupt | ( | FLASHCTL_Regs * | flashctl | ) |
Disable flash interrupt.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_FlashCTL_isInterruptEnabled | ( | const FLASHCTL_Regs * | flashctl | ) |
Check if the flash interrupt is enabled.
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | if interrupt is disabled |
true | if interrupt is enabled |
__STATIC_INLINE uint32_t DL_FlashCTL_getEnabledInterruptStatus | ( | const FLASHCTL_Regs * | flashctl | ) |
Check interrupt flag of enabled flash interrupt.
Checks if the flash interrupt that was previously enabled is pending.
[in] | flashctl | Pointer to the register overlay for the peripheral |
0 | if no interrupt is enabled |
The | value of DL_FLASHCTL_INTERRUPT |
__STATIC_INLINE uint32_t DL_FlashCTL_getRawInterruptStatus | ( | const FLASHCTL_Regs * | flashctl | ) |
Check interrupt flag of the flash interrupt.
Checks if the flash interrupt is pending. Interrupts do not have to be previously enabled.
[in] | flashctl | Pointer to the register overlay for the peripheral |
0 | if no interrupt is enabled |
The | value of DL_FLASHCTL_INTERRUPT |
__STATIC_INLINE uint32_t DL_FlashCTL_getPendingInterrupt | ( | const FLASHCTL_Regs * | flashctl | ) |
Get highest priority pending flash interrupt.
Checks if the flash interrupt is pending. Interrupts do not have to be previously enabled.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_clearInterruptStatus | ( | FLASHCTL_Regs * | flashctl | ) |
Clear pending flash interrupt.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_FlashCTL_isCommandExecuted | ( | const FLASHCTL_Regs * | flashctl | ) |
Checks if a command execution has been initiated.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_setCommandExecute | ( | FLASHCTL_Regs * | flashctl | ) |
Initiates a command execution.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_disbleStairStepErase | ( | FLASHCTL_Regs * | flashctl | ) |
Disable Stair-Step Erase.
The default VHV trim voltage setting will be used for all erase pulses.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_FlashCTL_isStairStepEraseDisabled | ( | const FLASHCTL_Regs * | flashctl | ) |
Checks if stair-step erase is disabled.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_enableStairStepErase | ( | FLASHCTL_Regs * | flashctl | ) |
Enable Stair-Step Erase.
The VHV voltage will be stepped during successive erase pulses. The step count, step voltage, begin and end voltages are all hard-wired. This is enabled by default.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_enableAddressOverrideMode | ( | FLASHCTL_Regs * | flashctl | ) |
Enable address override mode.
This overrides hardware address translation in CMDADDR from a system address to a bank address and bank ID. Use data written to CMDADDR directly as the bank address. Use the value written to CMDCTL.BANKSEL directly as the bank ID. Use the value written to CMDCTL.REGIONSEL directly as the region ID.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_FlashCTL_isAddressOverrideModeEnabled | ( | const FLASHCTL_Regs * | flashctl | ) |
Checks if address override mode is enabled.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_disableAddressOverrideMode | ( | FLASHCTL_Regs * | flashctl | ) |
Disable address override mode.
Disable address override mode and return to system addressed mode.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_enableOverrideHardwareGeneratedECC | ( | FLASHCTL_Regs * | flashctl | ) |
Enable overriding hardware generation of ECC code.
Override hardware ECC code generation by the flash controller. When enabled, the user can then manually set the ECC code to be programmed by calling DL_FlashCTL_setCommandDataECC.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_FlashCTL_isOverrideHardwareGeneratedECCEnabled | ( | const FLASHCTL_Regs * | flashctl | ) |
Checks if overriding hardware generation of ECC code is enabled.
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_disableOverrideHardwareGeneratedECC | ( | FLASHCTL_Regs * | flashctl | ) |
Disable overriding hardware generation of ECC code.
Disable overriding hardware generation of ECC code, so the flash controller will handle generating the needed ECC bits from the data
[in] | flashctl | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_FlashCTL_setRegionSelect | ( | FLASHCTL_Regs * | flashctl, |
DL_FLASHCTL_REGION_SELECT | region | ||
) |
Set the region select.
A specific region ID can be written to this field to indicate to which region an operation should be applied if CMDCTL.ADDRXLATEOVR is set.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | region | Region to select. One of DL_FLASHCTL_REGION_SELECT |
References DL_Common_updateReg().
__STATIC_INLINE DL_FLASHCTL_REGION_SELECT DL_FlashCTL_getRegionSelect | ( | const FLASHCTL_Regs * | flashctl | ) |
Get the region select.
[in] | flashctl | Pointer to the register overlay for the peripheral |
One | of DL_FLASHCTL_REGION_SELECT |
__STATIC_INLINE void DL_FlashCTL_setBankSelect | ( | FLASHCTL_Regs * | flashctl, |
DL_FLASHCTL_BANK_SELECT | bank | ||
) |
Set the bank select.
A specific bank ID can be written to this field to indicate which bank an operation should be applied if CMDCTL.ADDRXLATEOVR is set.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | bank | Bank to select. One of DL_FLASHCTL_BANK_SELECT |
References DL_Common_updateReg().
__STATIC_INLINE DL_FLASHCTL_BANK_SELECT DL_FlashCTL_getBankSelect | ( | const FLASHCTL_Regs * | flashctl | ) |
Get the bank select.
[in] | flashctl | Pointer to the register overlay for the peripheral |
One | of DL_FLASHCTL_BANK_SELECT |
__STATIC_INLINE void DL_FlashCTL_setCommandByteEnable | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | byteMask | ||
) |
Set the bytes to enable for programming data.
This register forms a per-byte enable for programming data. Each bit in CMDBYTEN corresponds to a byte in the addressed flash word to be programmed, including the ECC byte. This allows sub-word programming (programming of less than the full 64 or 72 bit flash word) if desired.
ECC data bytes are protected by the MSB bits in this register, depending on the presence of ECC and the flash word data width. Note: Refer to the TRM on how to correctly handle ECC for sub-word programs. You cannot correctly program the ECC bits if the whole 64 bits of the data word is not programmed, so the ECC byte should not be enabled until all 64 bits of the flash word are programmed.
This register is written to all 0 after the completion of all FLASHCTL commands.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | byteMask | Mask of bytes to enable. Between [0,0x1FF]. For example:
|
__STATIC_INLINE uint32_t DL_FlashCTL_getCommandByteEnable | ( | const FLASHCTL_Regs * | flashctl | ) |
Get the bytes that are enabled for programming data.
This register forms a per-byte enable for programming data. Each bit in CMDBYTEN corresponds to a byte in the addressed flash word to be programmed, including the ECC byte. This allows sub-word programming (programming of less than the full 64 or 72 bit flash word) if desired.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Value | between [0,0x1FF]. |
__STATIC_INLINE void DL_FlashCTL_setCommandData | ( | FLASHCTL_Regs * | flashctl, |
uint8_t | index, | ||
const uint32_t * | data | ||
) |
Set the data for a command data register.
The command data registers, CMDDATAx, are used to form the data for a command. For devices which only support single word programming, only the CMDDATA0 and CMDDATA1 registers are used to load data to be programmed to the flash memory. CMDDATA0 is always loaded with BIT31-BIT0 of the target data, and CMDDATA1 is always loaded with BIT63-BIT32 of the target data. If fewer than 64 data bits are being programmed, see the special handling requirements section in the device TRM for programming less than one flash word.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | index | Select the command data register to write to. Please see the device TRM for the number of CMDDATA registers. For example:
|
[in] | data | Data to write to the command data register. Value between [0,0xFFFFFFFF] |
__STATIC_INLINE uint32_t DL_FlashCTL_getCommandData | ( | FLASHCTL_Regs * | flashctl, |
uint8_t | index | ||
) |
Get the data from a command data register.
For devices which only support single word programming, only the CMDDATA0 and CMDDATA1 registers are used to load data to be programmed to the flash memory. CMDDATA0 is always loaded with BIT31-BIT0 of the target data, and CMDDATA1 is always loaded with BIT63-BIT32 of the target data.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | index | Select the command data register to write to. Please see the device TRM for the number of CMDDATA registers. For example:
|
Value | between [0,0xFFFFFFFF]. |
__STATIC_INLINE void DL_FlashCTL_setCommandDataECC | ( | FLASHCTL_Regs * | flashctl, |
uint8_t | index, | ||
const uint8_t * | data | ||
) |
Set the ECC code in the command data ECC register.
This register forms the ECC portion of the data for a command.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | index | Select the command data ECC register to write to. Please see the device TRM for the number of CMDDATAECC registers. For example:
|
[in] | data | Data to write to the command data ECC register. Value between [0, 0xFF] |
__STATIC_INLINE uint8_t DL_FlashCTL_getCommandDataECC | ( | FLASHCTL_Regs * | flashctl, |
uint8_t | index | ||
) |
Get the ECC code in the command data ECC register.
This register forms the ECC portion of the data for a command.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | index | Select the command data register ECC to write to. Please see the device TRM for the number of CMDDATAECC registers. For example:
|
Value | between [0,0xFF]. |
__STATIC_INLINE void DL_FlashCTL_setCommandAddress | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address | ||
) |
Sets the target address for a command.
The target address for a command must be flash word (64-bit) aligned. This means that the target address must be aligned to a 0b000 boundary (for example, the 3 LSBs in the address must be zero).
1) For single-word program, this address indicates the flash bank word to be programmed. 2) For multi-word program, this address indicates the first flash bank address for the program. The address will be incremented 3) For sector and bank erase, this address indicates the sector or bank to be erased. 4) For read verify, this address forms the start address for the verify operation.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination address to program/erase/read |
__STATIC_INLINE DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_getCommandStatus | ( | const FLASHCTL_Regs * | flashctl | ) |
Returns the status of the current command.
Checks if the command is still in progress or finished and if it passed or failed
[in] | flashctl | Pointer to the register overlay for the peripheral |
One | of DL_FLASHCTL_COMMAND_STATUS values |
__STATIC_INLINE DL_FLASHCTL_FAIL_TYPE DL_FlashCTL_getFailureStatus | ( | const FLASHCTL_Regs * | flashctl | ) |
Returns the reason a command failed.
[in] | flashctl | Pointer to the register overlay for the peripheral |
One | of DL_FLASHCTL_FAIL_TYPE values |
__STATIC_INLINE bool DL_FlashCTL_waitForCmdDone | ( | const FLASHCTL_Regs * | flashctl | ) |
Blocking function that waits for a command execution to finish.
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | if command didn't succeed |
true | if command was successful |
__STATIC_INLINE void DL_FlashCTL_executeClearStatus | ( | FLASHCTL_Regs * | flashctl | ) |
Sets clear status bit and executes command.
This will clear the STATCMD register and re-apply max protection to the CMDWEPROTx registers
[in] | flashctl | Pointer to the register overlay for the peripheral |
References DL_FLASHCTL_COMMAND_TYPE_CLEAR_STATUS.
__STATIC_INLINE uint32_t DL_FlashCTL_getFlashSectorNumber | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | addr | ||
) |
Gets the sector number of the input address over the whole memory map.
If the device has two 128KB banks, and the input address is 0x20000, then this API will return the sector number as 128. To get the sector number over the whole memory map of the device, refer to DL_FlashCTL_getFlashSectorNumberInBank.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | addr | Memory address within the desired sector |
Referenced by DL_FlashCTL_getFlashSectorNumberInBank().
__STATIC_INLINE uint32_t DL_FlashCTL_getFlashSectorNumberInBank | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | addr | ||
) |
Gets the sector number of the input address relative to the bank of the address.
If the device has two 128KB banks, and the input address is 0x20000, then this API will return the sector number as 0. This is because 0x20000 is in Sector 0 of Bank 1. To get the sector number over the whole memory map of the device, refer to DL_FlashCTL_getFlashSectorNumber.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | addr | Memory address within the desired sector |
References DL_FactoryRegion_getMAINFlashSize(), DL_FactoryRegion_getNumBanks(), and DL_FlashCTL_getFlashSectorNumber().
__STATIC_INLINE void DL_FlashCTL_setWaitState | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | waitState | ||
) |
Set the number of wait states used by the Flash.
Changes the number of wait states used by the Flash controller. When changing the frequency of the clock, the number of wait states may need to be updated.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | waitState | Number of wait states to set. Recommended values are based on the system clock speed:
|
__STATIC_INLINE uint32_t DL_FlashCTL_getWaitState | ( | const FLASHCTL_Regs * | flashctl | ) |
Get the number of wait states used by the Flash.
[in] | flashctl | Pointer to the register overlay for the peripheral |
References DL_FlashCTL_blankVerify(), DL_FlashCTL_blankVerifyFromRAM(), DL_FlashCTL_eraseDataBank(), DL_FlashCTL_eraseDataBankFromRAM(), DL_FlashCTL_eraseMemory(), DL_FlashCTL_eraseMemoryFromRAM(), DL_FlashCTL_factoryReset(), DL_FlashCTL_factoryResetFromRAM(), DL_FlashCTL_factoryResetMultiBank(), DL_FlashCTL_massErase(), DL_FlashCTL_massEraseFromRAM(), DL_FlashCTL_massEraseMultiBank(), DL_FlashCTL_programMemory128(), DL_FlashCTL_programMemory128WithECCGenerated(), DL_FlashCTL_programMemory128WithECCManual(), DL_FlashCTL_programMemory16(), DL_FlashCTL_programMemory16WithECCGenerated(), DL_FlashCTL_programMemory16WithECCManual(), DL_FlashCTL_programMemory32(), DL_FlashCTL_programMemory32WithECCGenerated(), DL_FlashCTL_programMemory32WithECCManual(), DL_FlashCTL_programMemory64(), DL_FlashCTL_programMemory64WithECCGenerated(), DL_FlashCTL_programMemory64WithECCManual(), DL_FlashCTL_programMemory8(), DL_FlashCTL_programMemory8WithECCGenerated(), DL_FlashCTL_programMemory8WithECCManual(), DL_FlashCTL_programMemoryBlocking(), DL_FlashCTL_programMemoryBlocking128WithECCGenerated(), DL_FlashCTL_programMemoryBlocking64WithECCGenerated(), DL_FlashCTL_programMemoryBlocking64WithECCManual(), DL_FlashCTL_programMemoryBlockingFromRAM64WithECCGenerated(), DL_FlashCTL_programMemoryBlockingFromRAM64WithECCManual(), DL_FlashCTL_programMemoryFromRAM(), DL_FlashCTL_programMemoryFromRAM16(), DL_FlashCTL_programMemoryFromRAM16WithECCGenerated(), DL_FlashCTL_programMemoryFromRAM16WithECCManual(), DL_FlashCTL_programMemoryFromRAM32(), DL_FlashCTL_programMemoryFromRAM32WithECCGenerated(), DL_FlashCTL_programMemoryFromRAM32WithECCManual(), DL_FlashCTL_programMemoryFromRAM64(), DL_FlashCTL_programMemoryFromRAM64WithECCGenerated(), DL_FlashCTL_programMemoryFromRAM64WithECCManual(), DL_FlashCTL_programMemoryFromRAM8(), DL_FlashCTL_programMemoryFromRAM8WithECCGenerated(), DL_FlashCTL_programMemoryFromRAM8WithECCManual(), DL_FlashCTL_protectAllMemory(), DL_FlashCTL_protectMainMemory(), DL_FlashCTL_protectNonMainMemory(), DL_FlashCTL_protectSector(), DL_FlashCTL_readVerify16(), DL_FlashCTL_readVerify16WithECCGenerated(), DL_FlashCTL_readVerify16WithECCManual(), DL_FlashCTL_readVerify32(), DL_FlashCTL_readVerify32WithECCGenerated(), DL_FlashCTL_readVerify32WithECCManual(), DL_FlashCTL_readVerify64(), DL_FlashCTL_readVerify64WithECCGenerated(), DL_FlashCTL_readVerify64WithECCManual(), DL_FlashCTL_readVerify8(), DL_FlashCTL_readVerify8WithECCGenerated(), DL_FlashCTL_readVerify8WithECCManual(), DL_FlashCTL_readVerifyFromRAM16(), DL_FlashCTL_readVerifyFromRAM16WithECCGenerated(), DL_FlashCTL_readVerifyFromRAM16WithECCManual(), DL_FlashCTL_readVerifyFromRAM32(), DL_FlashCTL_readVerifyFromRAM32WithECCGenerated(), DL_FlashCTL_readVerifyFromRAM32WithECCManual(), DL_FlashCTL_readVerifyFromRAM64(), DL_FlashCTL_readVerifyFromRAM64WithECCGenerated(), DL_FlashCTL_readVerifyFromRAM64WithECCManual(), DL_FlashCTL_readVerifyFromRAM8(), DL_FlashCTL_readVerifyFromRAM8WithECCGenerated(), DL_FlashCTL_readVerifyFromRAM8WithECCManual(), DL_FlashCTL_unprotectAllMemory(), DL_FlashCTL_unprotectDataMemory(), DL_FlashCTL_unprotectMainMemory(), DL_FlashCTL_unprotectNonMainMemory(), and DL_FlashCTL_unprotectSector().
void DL_FlashCTL_eraseMemory | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
DL_FLASHCTL_COMMAND_SIZE | memorySize | ||
) |
Performs an erase on unprotected memory.
Performs an erase on unprotected memory within a sector or bank of memory containing the input memory address.
NOTE: The user is responsible for unprotecting the regions of memory prior to calling this API. Memory will be automatically protected following the command execution.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address within desired sector or bank to erase |
[in] | memorySize | The size of the memory block to erase. One of:
|
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_eraseMemoryFromRAM | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
DL_FLASHCTL_COMMAND_SIZE | memorySize | ||
) |
Performs an erase on unprotected memory, and executes command from RAM.
Performs an erase on unprotected memory within a sector or bank of memory containing the input memory address.
The command is executed from RAM, and blocks until the command is finished.
NOTE: The user is responsible for unprotecting the regions of memory prior to calling this API. Memory will be automatically protected following the command execution.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address within desired sector or bank to erase |
[in] | memorySize | The size of the memory block to erase. One of:
|
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_massErase | ( | FLASHCTL_Regs * | flashctl | ) |
Performs a mass erase on main memory on one bank.
Performs a mass erase on main memory on Bank 0 only. This API should be used on single bank devices.
NOTE: This API sets all main memory to unprotected from erase/program
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | if erase didn't succeed |
true | if erase was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_massEraseFromRAM | ( | FLASHCTL_Regs * | flashctl | ) |
Performs a mass erase on main memory, and executes command from RAM.
Performs a mass erase on main memory on Bank 0 only. This API should be used on single bank devices.
The command is executed from RAM, and blocks until the command is finished.
NOTE: This API sets all main memory to unprotected from erase/program
[in] | flashctl | Pointer to the register overlay for the peripheral |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_massEraseMultiBank | ( | FLASHCTL_Regs * | flashctl | ) |
Performs a mass erase on main memory, and erases all flash banks.
Performs a mass erase on main memory within each flash bank.
NOTE: This API sets all main memory to unprotected from erase/program
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | if erase didn't succeed |
true | if erase was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_factoryReset | ( | FLASHCTL_Regs * | flashctl | ) |
Performs a factory reset erase on main and non-main memory.
Performs an erase on Bank 0 of main memory and non-main memory on the device. This API should be used on single bank devices.
NOTE: This API sets all main memory to protected from erase/program if successful. If unsuccessful, all memory will be unprotected
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | if erase didn't succeed |
true | if erase was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_factoryResetFromRAM | ( | FLASHCTL_Regs * | flashctl | ) |
Performs a factory reset erase on main and non-main memory, and executes command from RAM.
Performs an erase on Bank 0 of main memory and non-main memory on the device. This API should be used on single bank devices.
The command is executed from RAM, and blocks until the command is finished.
NOTE: This API sets all main memory to protected from erase/program if successful. If unsuccessful, all memory will be unprotected
[in] | flashctl | Pointer to the register overlay for the peripheral |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_factoryResetMultiBank | ( | FLASHCTL_Regs * | flashctl | ) |
Performs a factory reset erase on main and non-main memory.
Performs an erase on all flash banks of main memory and non-main memory on the device.
NOTE: This API sets all main memory to protected from erase/program if successful. If unsuccessful, all memory will be unprotected
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | if erase didn't succeed |
true | if erase was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory8 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Programs 8 bit data to unprotected memory at the given address.
The device datasheet specifies a maximum limit on program operations per word line before erasure of the sector containing the word line is required. Exceeding this maximum may result in data corruption within the word line. If 8-bit (byte) program operations are performed, or the same memory locations are programmed more than once, the max program limit per word line must be considered and not exceeded. Because of that, it is better to buffer data and use the DL_FlashCTL_programMemory16, DL_FlashCTL_programMemory32 or DL_FlashCTL_programMemory64 APIs to program memory to reduce in the number of program operations in a wordline.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 8-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM8 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Programs 8 bit data to unprotected memory at the given address, and executes command from RAM.
The device datasheet specifies a maximum limit on program operations per word line before erasure of the sector containing the word line is required. Exceeding this maximum may result in data corruption within the word line. If 8-bit (byte) program operations are performed, or the same memory locations are programmed more than once, the max program limit per word line must be considered and not exceeded. Because of that, it is better to buffer data and use the DL_FlashCTL_programMemory16, DL_FlashCTL_programMemory32 or DL_FlashCTL_programMemory64 APIs to program memory to reduce in the number of program operations in a wordline.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 8-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory16 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Programs 16 bit data to unprotected memory at the given address.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 16-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM16 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Programs 16 bit data to unprotected memory at the given address, and executes command from RAM.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 16-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory32 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 32 bit data to unprotected memory at the given address.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM32 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 32 bit data to unprotected memory at the given address, and executes command from RAM.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory64 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 64 bit data to unprotected memory at the given address.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM64 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 64 bit data to unprotected memory at the given address, and executes command from RAM.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory8WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Programs 8 bit data with hardware generated ECC code.
Programs 8 bit data, along with the 8 ECC bits which correspond to the 8-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 8-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM8WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Programs 8 bit data with hardware generated ECC code, and executes command from RAM.
Programs 8 bit data, along with the 8 ECC bits which correspond to the 8-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 8-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory16WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Programs 16 bit data with hardware generated ECC code.
Programs 16 bit data, along with the 8 ECC bits which correspond to the 16-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 16-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM16WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Programs 16 bit data with hardware generated ECC code, and executes command from RAM.
Programs 16 bit data, along with the 8 ECC bits which correspond to the 16-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 16-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory32WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 32 bit data with hardware generated ECC code.
Programs 32 bit data, along with the 8 ECC bits which correspond to the 32-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM32WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 32 bit data with hardware generated ECC code, and executes command from RAM.
Programs 32 bit data, along with the 8 ECC bits which correspond to the 32-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory64WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 64 bit data with hardware generated ECC code.
Programs 64 bit data, along with the 8 ECC bits which correspond to the 64-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM64WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 64 bit data with hardware generated ECC code, and executes command from RAM.
Programs 16 bit data, along with the 8 ECC bits which correspond to the 16-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory8WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 8 bit data with user provided ECC code.
Programs 8 bit data, along with the 8 ECC bits which correspond to the 8-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 8-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM8WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 8 bit data with user provided ECC code, and executes command from RAM.
Programs 8 bit data, along with the 8 ECC bits which correspond to the 8-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 8-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory16WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 16 bit data with user provided ECC code.
Programs 16 bit data, along with the 8 ECC bits which correspond to the 16-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 16-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM16WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 16 bit data with user provided ECC code, and executes command from RAM.
Programs 16 bit data, along with the 8 ECC bits which correspond to the 16-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 16-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory32WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 32 bit data with user provided ECC code.
Programs 32 bit data, along with the 8 ECC bits which correspond to the 32-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM32WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 32 bit data with user provided ECC code, and executes command from RAM.
Programs 32 bit data, along with the 8 ECC bits which correspond to the 32-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory64WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 64 bit data with user provided ECC code.
Programs 64 bit data, along with the 8 ECC bits which correspond to the 64-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM64WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 64 bit data with user provided ECC code, and executes command from RAM.
Programs 64 bit data, along with the 8 ECC bits which correspond to the 64-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_programMemoryBlocking64WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data with hardware generated ECC code.
Blocking function that programs a set of data, along with the 8 ECC bits which correspond to the data at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program. Value should be an even number, to ensure data is programmed 64-bits at a time. |
[in] | data | Pointer to the data source to program into flash |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
false | Program didn't succeed, or invalid dataSize |
true | Program was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryBlockingFromRAM64WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data with hardware generated ECC code, and executes command from RAM.
Blocking function that programs a set of data, along with the 8 ECC bits which correspond to the data at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program. Value should be an even number, to ensure data is programmed 64-bits at a time. |
[in] | data | Pointer to the data source to program into flash |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_programMemoryBlocking64WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint8_t * | eccCode, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data with user provided ECC code.
Blocking function that programs a set of data, along with the 8 ECC bits which correspond to the data at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program. Value should be an even number, to ensure data is programmed 64-bits at a time. |
[in] | data | Pointer to the data source to program into flash |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
false | Program didn't succeed, or invalid dataSize |
true | Program was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryBlockingFromRAM64WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint8_t * | eccCode, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data with user provided ECC code, and executes command from RAM.
Blocking function that programs a set of data, along with the 8 ECC bits which correspond to the data at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program. Value should be an even number, to ensure data is programmed 64-bits at a time. |
[in] | data | Pointer to the data source to program into flash |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_programMemoryBlocking | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data to unprotected memory at a given address.
Blocking function that programs a set of data. Data will be programmed as flash words (64-bits). If dataSize is an odd number, then the last word will be programmed as 32-bit data.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program |
[in] | data | Pointer to the data source to program into flash |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
false | Program didn't succeed |
true | Program was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_programMemoryFromRAM | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data to unprotected memory at a given address, and executes command from RAM.
Blocking function that programs a set of data. Data will be programmed as flash words (64-bits). If dataSize is an odd number, then the last word will be programmed as 32-bit data.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program |
[in] | data | Pointer to the data source to program into flash |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_unprotectMainMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Unprotects all main memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_unprotectDataMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Unprotects all data memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_protectMainMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Protects all main memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_unprotectNonMainMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Unprotects all non-main memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_protectNonMainMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Protects all non-main memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_unprotectAllMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Unprotects all user memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_protectAllMemory | ( | FLASHCTL_Regs * | flashctl | ) |
Protects all user memory from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_unprotectSector | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | addr, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Sets a given sector to unprotected from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | addr | Address of sector to unprotect |
[in] | regionSelect | The region of memory to unprotect. One of DL_FLASHCTL_REGION_SELECT |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_protectSector | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | addr, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Sets a given sector to protected from erase/program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | addr | Address of sector to protect |
[in] | regionSelect | The region of memory to protect. One of DL_FLASHCTL_REGION_SELECT |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify8 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Verifies 8-bit data in specified address.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM8 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Verifies 8-bit data in specified address, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify16 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Verifies 16-bit data in specified address.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM16 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Verifies 16-bit data in specified address, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify32 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 32-bit data in specified address.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM32 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 32-bit data in specified address, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify64 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 64-bit data in specified address.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify. |
[in] | data | Pointer to the data source to verify |
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM64 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 64-bit data in specified address, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify. |
[in] | data | Pointer to the data source to verify |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify8WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Verifies 8-bit data in specified address with hardware generated ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM8WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data | ||
) |
Verifies 8-bit data in specified address with hardware generated ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify16WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Verifies 16-bit data in specified address with hardware generated ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM16WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data | ||
) |
Verifies 16-bit data in specified address with hardware generated ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify32WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 32-bit data in specified address with hardware generated ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM32WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 32-bit data in specified address with hardware generated ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify64WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 64-bit data in specified address with hardware generated ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM64WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Verifies 32-bit data in specified address with hardware generated ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify8WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 8-bit data in specified address with user provided ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM8WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint8_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 8-bit data in specified address with user provided ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify16WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 16-bit data in specified address with user provided ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM16WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint16_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 16-bit data in specified address with user provided ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify32WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 32-bit data in specified address with user provided ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM32WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 32-bit data in specified address with user provided ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_readVerify64WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 64-bit data in specified address with user provided ECC code.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_readVerifyFromRAM64WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Verifies 64-bit data in specified address with user provided ECC code, and executes command from RAM.
The READVERIFY command may be used to read a flash location and compare it to data to be verified along with the 8 ECC bits which correspond to the data. This API assumes that hardware generation of the ECC code HAS been disabled, so the user must provide the ECC code to program.
The command is executed from RAM, and blocks until the command is finished.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
[in] | data | Pointer to the data source to verify |
[in] | eccCode | Pointer to ECC code to program corresponding to data |
NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_blankVerify | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address | ||
) |
Verifies that a flash word is blank.
A blank flash word is defined as a flash word which has been successfully erased with the ERASE command and not yet programmed away from that non-erased state with the PROGRAM command. The BLANKVERIFY command may be used to test if a flash word is in a blank state, indicating it has not yet been programmed away from an erased state. The BLANKVERIFY command may only be applied to a single flash word at a time.
NOTE: After this command is executed, the flash controller will configure all memory to a protected state.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_blankVerifyFromRAM | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address | ||
) |
Verifies that a flash word is blank, and executes command from RAM.
A blank flash word is defined as a flash word which has been successfully erased with the ERASE command and not yet programmed away from that non-erased state with the PROGRAM command. The BLANKVERIFY command may be used to test if a flash word is in a blank state, indicating it has not yet been programmed away from an erased state. The BLANKVERIFY command may only be applied to a single flash word at a time.
The command is executed from RAM, and blocks until the command is finished.
NOTE: After this command is executed, the flash controller will configure all memory to a protected state.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Memory address of flash to verify |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory128 | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 128 bit data to unprotected memory at the given address.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory128WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data | ||
) |
Programs 128 bit data with hardware generated ECC code.
Programs 128 bit data, along with the 16 ECC bits which correspond to the 128-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
void DL_FlashCTL_programMemory128WithECCManual | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
const uint32_t * | data, | ||
const uint8_t * | eccCode | ||
) |
Programs 128 bit data with hardware generated ECC code.
Programs 128 bit data, along with the 16 ECC bits which correspond to the 128-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code has NOT been disabled, and so the flash controller will generate the ECC bits.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided). Programs 128 bit data with user provided ECC code
Programs 128 bit data, along with the 16 ECC bits which correspond to the 128-bit data word, to unprotected memory at the given address. This API assumes that hardware generation of the ECC code HAS been disabled, and so the user must provide the ECC code to program.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | data | Pointer to the 32-bit source data |
[in] | eccCode | Pointer to the ECC code to program |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: After completion of a program operation, the flash controller will disable programming of the ECC code (regardless of whether ECC code is hardware generated or manually provided).
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_programMemoryBlocking128WithECCGenerated | ( | FLASHCTL_Regs * | flashctl, |
uint32_t | address, | ||
uint32_t * | data, | ||
uint32_t | dataSize, | ||
DL_FLASHCTL_REGION_SELECT | regionSelect | ||
) |
Programs provided data up to 128-bits with ECC generated while blocking between writes.
Blocking function that programs a set of data using multi-word programming for up to 2 flash words. Refer to the device datasheet if the device supports multi-word programming. When possible, the data will be programmed as either 64-bit data or as 32-bit data.
[in] | flashctl | Pointer to the register overlay for the peripheral |
[in] | address | Destination memory address to program data. The address must be flash word (64-bit) aligned i.e. aligned to a 0b000 boundary. |
[in] | dataSize | The number of 32-bit words to program |
[in] | data | Pointer to the data source to program into flash |
[in] | regionSelect | The region of memory to erase. One of DL_FLASHCTL_REGION_SELECT |
false | Program didn't succeed |
true | Program was successful |
NOTE: After completion of a program operation, the flash controller will configure all memory to a protected state. NOTE: This API does not enable programming the ECC code.
Referenced by DL_FlashCTL_getWaitState().
bool DL_FlashCTL_eraseDataBank | ( | FLASHCTL_Regs * | flashctl | ) |
Performs an erase on DATA bank.
Performs an erase on DATA bank only. This API should be used on devices with a DATA bank. To determine if device has DATA bank use DL_FactoryRegion_getDATAFlashSize API.
NOTE: This API erases all of DATA bank
[in] | flashctl | Pointer to the register overlay for the peripheral |
false | If erase didn't succeed |
true | If erase was successful |
Referenced by DL_FlashCTL_getWaitState().
DL_FLASHCTL_COMMAND_STATUS DL_FlashCTL_eraseDataBankFromRAM | ( | FLASHCTL_Regs * | flashctl | ) |
Performs an erase on DATA bank, and executes command from RAM.
Performs an erase on DATA bank only. This API should be used on devices with a DATA bank. To determine if device has DATA bank use DL_FactoryRegion_getDATAFlashSize API.
The command is executed from RAM, and blocks until the command is finished.
NOTE: This API erases all of DATA bank
[in] | flashctl | Pointer to the register overlay for the peripheral |
DL_FLASHCTL_COMMAND_STATUS_FAILED | if command didn't succeed |
DL_FLASHCTL_COMMAND_STATUS_PASSED | if command was successful |
Referenced by DL_FlashCTL_getWaitState().