STM32 Bootloader
Customizable Bootloader for STM32 microcontrollers
flash.h File Reference

This file contains the MCU internal flash driver function prototypes for read, write, erase, and write protection operations. More...

#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define SYSTEM_MEMORY_ADDRESS   0x1FFF0000U
 

Functions

void FlashClearErrorFlags (void)
 Clear all flash error flags.
 
bool FlashCheckIfDataFits (const uint32_t address, const uint32_t length)
 Check if an array of data fits into the flash. More...
 
bool FlashCheckIfWriteProtectionEnabled (const uint32_t address, const uint32_t length)
 Check if flash write protection is enabled for the specified region. More...
 
bool FlashDisableWriteProtection (void)
 Disable flash write protection for the application area. More...
 
bool FlashEnableWriteProtection (const uint32_t address, const uint32_t length)
 Enable flash write protection for the specified region. More...
 
bool FlashCompare (const uint8_t *const data, const uint32_t address, const uint32_t length)
 Compare buffer content with microcontroller flash content. More...
 
uint32_t FlashRead (uint8_t *const data, const uint32_t address, const uint32_t length)
 Read data from the microcontroller flash. More...
 
uint32_t FlashWrite (const uint8_t *const data, const uint32_t address, const uint32_t length)
 Write data into the microcontroller flash. More...
 
void FlashRemapMemoryToSystemFlash (void)
 Remap the microcontroller flash memory to the built-in system flash memory. More...
 

Detailed Description

This file contains the MCU internal flash driver function prototypes for read, write, erase, and write protection operations.

STM32 Bootloader

Author
Akos Pasztor

Definition in file flash.h.