evk_flash.h
This module is composed of all functionalities related to the MCU’s flash memory.
- Copyright
Copyright (C) 2020-2021 SPARK Microsystems International Inc. All rights reserved.
- License
This source code is proprietary and subject to the SPARK Microsystems Software EULA found in this package in file EULA.txt.
- Author
SPARK FW Team.
Functions
-
uint8_t evk_flash_prog(uint32_t address, const void *buffer, uint32_t size)
Program a region in a block of the MCU’s flash memory.
The block must be previously erased.
- Parameters:
address – [in] Flash memory address to write.
buffer – [in] Buffer to write.
size – [in] Size of the buffer.
- Returns:
HAL status code.
-
uint8_t evk_flash_erase(uint32_t block_count, uint32_t block)
Erase a memory block of the MCU’s flash memory.
The state of an erased block is undefined. A block must be erased before being programmed.
- Parameters:
block_count – [in] Number of erasable blocks on the device.
block – [in] Block index.
- Returns:
HAL status code.