embassy-stm32

Crates

git

Versions

stm32l471ze

Flavors

Skip to main content

Module flash

Module flash 

Source
Expand description

Flash memory (FLASH)

Flash gives access to the whole internal flash, addressed by offsets from FLASH_BASE. Flash::into_regions and Flash::into_blocking_regions split it into one driver per flash region (bank, or group of equally sized sectors), which can be handed to different parts of the application.

The driver is shared by all families. Writes are done in units of WRITE_SIZE bytes, which is the native program unit of the chip (a half-word on F0/F1/F3, a 256-bit flash word on H7, …), and erases are done per sector/page.

Structs§

Bank1Region
Bank2Region
Config
Flash driver configuration.
Flash
Internal flash memory driver.
FlashLayout
FlashRegion
Flash memory region
FlashSector
Flash sector.
InterruptHandler
Flash interrupt handler.

Enums§

Error
Flash error
FlashBank
Flash bank.

Constants§

BANK1_REGION
BANK2_REGION
FLASH_BASE
FLASH_REGIONS
FLASH_SIZE
MAX_ERASE_SIZE
READ_SIZE
Read size (always 1)
WRITE_SIZE

Functions§

banks_swapped
Returns whether flash banks 1 and 2 are currently swapped in the memory map.
get_flash_regions
Get all flash regions.