FlashBootloader Core

Description

Interface to internal flash.

Used for writing application images to the main flash.

Functions

void flash_init (void)
void flash_deinit (void)
bool flash_erasePage (uint32_t address)
bool flash_writeWord (uint32_t address, uint32_t data)
bool flash_writeBuffer (uint32_t address, void *data, size_t length)

Function Documentation

void flash_init ( void )

Initialize the flash driver

void flash_deinit ( void )

Deinitialize the flash driver

bool flash_erasePage ( uint32_t address )

Erase a flash page

Parameters
[in] address Start address of the flash page to erase.
Returns
True if operation was successful
bool flash_writeWord ( uint32_t address,
uint32_t data
)

Write a word to internal flash

Parameters
address Address in internal flash to write word to
data Word to write
Returns
True if operation was successful
bool flash_writeBuffer ( uint32_t address,
void * data,
size_t length
)

Write buffer to internal flash

Parameters
address Starting address to write data to. Must be half-word aligned.
data Data buffer to write to internal flash
length Amount of bytes in the data buffer to write
Returns
True if operation was successful