![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Modules | |
| FLC_Registers | |
| Registers, Bit Masks and Bit Positions for the FLC Peripheral Module. | |
Macros | |
| #define | MXC_FLASH_PAGE_MASK ~(MXC_FLASH_PAGE_SIZE - 1) |
| Bit mask that can be used to find the starting address of a page in flash. | |
| #define | MXC_FLASH_PAGE_ADDR(page) (MXC_FLASH_MEM_BASE + ((unsigned long)page * MXC_FLASH_PAGE_SIZE)) |
| Calculate the address of a page in flash from the page number. | |
Functions | |
| int | FLC_Init (const sys_cfg_t *sys_cfg) |
| Initializes the Flash Controller for erase/write operations. More... | |
| int | FLC_Busy (void) |
| Checks if Flash Controller is busy. More... | |
| int | FLC_MassErase (void) |
| Erases the entire flash array. More... | |
| int | FLC_PageErase (uint32_t address) |
| Erases the page of flash at the specified address. More... | |
| int | FLC_MultiPageErase (uint32_t start, uint32_t end) |
| Erases flash pages from start to end address inclusive. More... | |
| int | FLC_Erase (uint32_t start, uint32_t end, uint32_t *buffer, unsigned length) |
| Erase a range from start to end address. More... | |
| int | FLC_Write32 (uint32_t address, uint32_t data) |
| Writes the specified 32-bit value to flash. More... | |
| int | FLC_Write128 (uint32_t address, uint32_t *data) |
| Writes the specified 128-bits of data to flash. More... | |
| int | FLC_Write (uint32_t address, uint32_t length, uint32_t *buffer) |
| Writes data to flash. More... | |
| int | FLC_EnableInt (uint32_t mask) |
| Enable flash interrupts. More... | |
| int | FLC_DisableInt (uint32_t mask) |
| Disable flash interrupts. More... | |
| int | FLC_GetFlags (void) |
| Retrieve flash interrupt flags. More... | |
| int | FLC_ClearFlags (uint32_t mask) |
| Clear flash interrupt flags. More... | |
| int | FLC_UnlockInfoBlock (uint32_t address) |
| Unlock info block. More... | |
| int | FLC_LockInfoBlock (uint32_t address) |
| Lock info block. More... | |
| int FLC_Init | ( | const sys_cfg_t * | sys_cfg | ) |
| int FLC_Busy | ( | void | ) |
Reading or executing from flash is not possible if flash is busy with an erase or write operation.
| int FLC_MassErase | ( | void | ) |
| int FLC_PageErase | ( | uint32_t | address | ) |
| address | Any address within the page to erase. |
| int FLC_MultiPageErase | ( | uint32_t | start, |
| uint32_t | end | ||
| ) |
| start | Any address within the first page to erase. |
| end | Any address within the last page to erase. |
| int FLC_Erase | ( | uint32_t | start, |
| uint32_t | end, | ||
| uint32_t * | buffer, | ||
| unsigned | length | ||
| ) |
The function performs a read-modify-write of flash pages as needed.
| start | Starting address to erase, inclusive. |
| end | Ending address to erase, exclusive. |
| buffer | Data buffer to restore data in beginning and ending pages. |
| length | Length of given buffer. |
| int FLC_Write32 | ( | uint32_t | address, |
| uint32_t | data | ||
| ) |
| address | 32-bit aligned address in flash to write. |
| data | value to be written to flash. |
| int FLC_Write128 | ( | uint32_t | address, |
| uint32_t * | data | ||
| ) |
| address | 128-bit aligned address in flash to write. |
| data | pointer to data to be written to flash. |
| int FLC_Write | ( | uint32_t | address, |
| uint32_t | length, | ||
| uint32_t * | buffer | ||
| ) |
| address | Address in flash to start writing from. |
| length | Number of bytes to be written. |
| buffer | Pointer to data to be written to flash. |
| int FLC_EnableInt | ( | uint32_t | mask | ) |
| mask | Interrupts to enable |
| int FLC_DisableInt | ( | uint32_t | mask | ) |
| mask | Interrupts to disable |
| int FLC_GetFlags | ( | void | ) |
| int FLC_ClearFlags | ( | uint32_t | mask | ) |
| mask | Flag bit(s) to clear |
| int FLC_UnlockInfoBlock | ( | uint32_t | address | ) |
| [in] | address | The address in the info block needing written to |
| int FLC_LockInfoBlock | ( | uint32_t | address | ) |
| [in] | address | The address in the info block that was written to |