1#ifndef INCLUDE_GUARD__STM32_INTERNAL_FLASH_DRIVERS_H__
2#define INCLUDE_GUARD__STM32_INTERNAL_FLASH_DRIVERS_H__
6#include "stm32l4xx_hal.h"
7#include "stm32l4xx_hal_flash.h"
uint8_t STM32_internal_flash_write(uint32_t address, uint8_t *data, uint32_t length, STM32_Internal_Flash_Write_Status_t *status)
Writes data to the flash memory in chunks of 8 bytes.
Definition stm32_internal_flash_drivers.c:19
uint8_t STM32_internal_flash_set_active_flash_bank(uint8_t wanted_active_flash_bank)
Sets the active flash bank to either 1 or 2 (only if it is different than the current active flash ba...
Definition stm32_internal_flash_drivers.c:160
STM32_INTERNAL_FLASH_memory_region_addresses_t
Flash Partitions.
Definition stm32_internal_flash_drivers.h:13
@ STM32_INTERNAL_FLASH_MEMORY_REGION_RAM_2_ADDRESS
Definition stm32_internal_flash_drivers.h:15
@ STM32_INTERNAL_FLASH_MEMORY_REGION_GOLDEN_COPY_ADDRESS
Definition stm32_internal_flash_drivers.h:18
@ STM32_INTERNAL_FLASH_MEMORY_REGION_RAM_3_ADDRESS
Definition stm32_internal_flash_drivers.h:16
@ STM32_INTERNAL_FLASH_MEMORY_REGION_RAM_ADDRESS
Definition stm32_internal_flash_drivers.h:14
@ STM32_INTERNAL_FLASH_MEMORY_REGION_FLASH_ADDRESS
Definition stm32_internal_flash_drivers.h:17
uint8_t STM32_internal_flash_erase(uint16_t start_page_erase, uint16_t number_of_pages_to_erase, uint32_t *page_error)
Erase pages from bank 2 of flash memory which is located at 0x08100000.
Definition stm32_internal_flash_drivers.c:105
uint8_t STM32_internal_flash_get_option_bytes(FLASH_OBProgramInitTypeDef *ob_data)
Gets option bytes configuration from the stm32 internal flash memory.
Definition stm32_internal_flash_drivers.c:148
uint8_t STM32_internal_flash_read(uint32_t address, uint8_t *buffer, uint32_t length)
Reads data from the flash memory.
Definition stm32_internal_flash_drivers.c:85
uint8_t STM32_internal_flash_get_active_flash_bank()
Returns active flash bank.
Definition stm32_internal_flash_drivers.c:221
Definition stm32_internal_flash_drivers.h:22
HAL_StatusTypeDef unlock_status
Definition stm32_internal_flash_drivers.h:24
HAL_StatusTypeDef lock_status
Definition stm32_internal_flash_drivers.h:23
HAL_StatusTypeDef write_status
Definition stm32_internal_flash_drivers.h:25