The functions in this group are used to erase selected portions of a flash device.
ALT_STATUS_CODE alt_qspi_query_erase_options |
( |
uint32_t * |
options | ) |
|
This function queries the available erase sizes
Each bit that is set signifies an erase size available
- Parameters
-
options | A pointer to a 32 bit integer which will contain the erase sizes |
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |
ALT_STATUS_CODE alt_qspi_query_erase_span |
( |
uint32_t |
address, |
|
|
uint32_t |
size, |
|
|
uint32_t * |
actual_address, |
|
|
uint32_t * |
actual_size |
|
) |
| |
Determine how much qspi memory actually needs to be erased for erasing a specific area *
- Parameters
-
address | The qspi address that you want to erase |
size | The amount of qspi memory that you want to erase |
actual | address Pointer to store the first qspi address that would be erased |
actual_size | Point to store the actual size that would be erased |
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |
ALT_STATUS_CODE alt_qspi_erase_chip |
( |
void |
| ) |
|
Erase the entire qspi memory
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |
ALT_STATUS_CODE alt_qspi_erase |
( |
uint32_t |
address, |
|
|
uint32_t |
size |
|
) |
| |
Erase a portion of flash
- Parameters
-
address | The qspi address that you want to erase |
size | The amount of qspi memory that you want to erase |
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |
ALT_STATUS_CODE alt_qspi_erase_sector |
( |
const uint32_t |
addr | ) |
|
This function erases the designated flash device sector.
This function erases the flash device sector containing the designated flash address. Any address within the sector is valid.
- Parameters
-
addr | A flash address contained within the the sector to be erased. |
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |
ALT_STATUS_CODE alt_qspi_replace |
( |
uint32_t |
dst, |
|
|
const void * |
src, |
|
|
size_t |
size, |
|
|
char * |
bank_buffer, |
|
|
uint32_t |
buffer_size |
|
) |
| |
This function erases the designated flash device sector.
This function erases the flash device sector containing the designated flash address. Any address within the sector is valid.
- Parameters
-
dst | The destination flash address to begin writing data to. |
src | The source address to start writing data from. |
size | The requested number of data bytes to write to the flash device. |
bank_buffer | A pointer to a buffer bug enough to store a qspi sector used for storing data between erasing and rewriting. The size of this buffer should be at least twice get_smallest_sector_size() |
- Return values
-
ALT_E_SUCCESS | Indicates successful completion. |
ALT_E_ERROR | Indicates an error occurred. |