Nvmc#

group bsp_nvmc

Read/write/erase flash memory.

Author

Alexandre Abadie alexandre.abadie@inria.fr

Copyright

Inria, 2023

Defines

DB_FLASH_PAGE_SIZE#

Flash page size.

DB_FLASH_PAGE_NUM#

Number of flash pages.

DB_FLASH_PAGE_OFFSET#

Base offset of the flash.

Functions

void db_nvmc_read(void *output, const uint32_t *addr, size_t len)#

Read some data from a given address.

Parameters:
  • output[out] Pointer to the output buffer

  • addr[in] Address to read from

  • len[in] Length of data to read

void db_nvmc_page_erase(uint32_t page)#

Erase a page on flash.

Parameters:
  • page[in] index of the page to erase

void db_nvmc_write(const uint32_t *addr, const void *input, size_t len)#

Write some data at a given address.

Parameters:
  • addr[in] Address to write to

  • input[in] Pointer to the intput buffer to write

  • len[in] Length of data to write