flash_erase

Execute erase in the internal flash.

int32_t flash_erase(
    struct flash_descriptor * flash,
    const uint32_t dst_addr,
    const uint32_t page_nums
)

Parameters

flash

Type: struct flash_descriptor Struct *

Pointer to the HAL FLASH instance.

dst_addr

Type: const uint32_t

Destination bytes address aligned with page start to be erased

page_nums

Type: const uint32_t

Number of pages to be erased

Returns

Type: int32_t

0

Success

-1

Error