Defines a driver for the Embedded Flash interface.
More...
|
#define | FLASH_SECTOR_SIZE (0x200u) |
| 819 uses 512 byte sector, 256KB on chip flash.
|
|
#define | FLASH_SIZE 0x40000 |
|
#define | FLASH_BASE_ADDRESS (0x500000u) |
|
#define | APPLICATION_SPECIFIC_FLASH_RESERVATION 0 |
| Number of sectors reserved from the end of the flash for the application specific purpose (for ex: to log the crash dump). More...
|
|
Defines a driver for the Embedded Flash interface.
#define APPLICATION_SPECIFIC_FLASH_RESERVATION 0 |
Number of sectors reserved from the end of the flash for the application specific purpose (for ex: to log the crash dump).
By default no reservation Note:- 16K of flash is used for internal firmware operation. (Remaining of the flash - reservation) can be divided equally and used for active and upgradable firmware. So, application should care the OTA firmware (application+patch) size while reserving using below.
wiced_result_t wiced_hal_eflash_erase |
( |
uint32_t |
offset, |
|
|
uint32_t |
length |
|
) |
| |
Erase the eflash.
Erase is performed page-wise. eflash page size is 0x200 bytes. eflash page count is 0x200.
- Parameters
-
offset | The start offset of eflash page to be erased. |
length | The length of data in byte's to be erased, erase performed page-wise. |
- Returns
- WICED_SUCCESS
- WICED_ERROR
Erase the whole eflash.
- Returns
- WICED_SUCCESS
- WICED_ERROR
uint32_t wiced_hal_eflash_get_size |
( |
void |
| ) |
|
Gets the size of the eflash.
- Returns
- eflash size
Initializes the embedded flash.
- Returns
- WICED_SUCCESS
- WICED_ERROR
wiced_result_t wiced_hal_eflash_read |
( |
uint32_t |
offset, |
|
|
uint8_t * |
p_buffer, |
|
|
uint32_t |
length |
|
) |
| |
Reads the data from eflash.
- Parameters
-
offset | The start offset of eflash from which data to be read, offset should be word aligned |
p_buffer | The pointer to the buffer to which data is to be read, buffer should be word aligned |
length | The length of data in byte's to be read |
- Returns
- WICED_SUCCESS
- WICED_ERROR
wiced_result_t wiced_hal_eflash_write |
( |
uint32_t |
offset, |
|
|
uint8_t * |
p_buffer, |
|
|
uint32_t |
length |
|
) |
| |
Writes the data to eflash.
Interrupts will be locked for the duration of the write. And only writes to an already erased location is valid.
- Parameters
-
offset | The start offset of eflash to be written, offset should be word aligned |
p_buffer | The pointer to the buffer from which data will be written, buffer should be byte, half-word, or word aligned. |
length | The length of data in byte's to be written, length should be word aligned |
- Returns
- WICED_SUCCESS
- WICED_ERROR