HAL FLASH Types

HAL FLASH Types

group FLASH_Exported_Types

Typedefs

typedef struct hal_flash_handle_s hal_flash_handle_t

HAL FLASH handle structure type

typedef void ( * hal_flash_program_cplt_cb_t ) ( hal_flash_handle_t * hflash )

HAL FLASH program complete callback pointer definition

typedef void ( * hal_flash_erase_by_addr_cplt_cb_t ) ( hal_flash_handle_t * hflash , uint32_t addr , uint32_t size_byte )

HAL FLASH erase by address complete callback pointer definition

typedef void ( * hal_flash_erase_page_cplt_cb_t ) ( hal_flash_handle_t * hflash , hal_flash_bank_t bank , uint32_t page , uint32_t page_nbr )

HAL FLASH erase by page complete callback pointer definition

typedef void ( * hal_flash_erase_bank_cplt_cb_t ) ( hal_flash_handle_t * hflash , hal_flash_bank_t bank )

HAL FLASH bank erase complete callback pointer definition

typedef void ( * hal_flash_mass_erase_cplt_cb_t ) ( hal_flash_handle_t * hflash )

HAL FLASH mass erase complete callback pointer definition

typedef void ( * hal_flash_error_cb_t ) ( hal_flash_handle_t * hflash )

HAL FLASH error callback pointer definition

typedef hal_status_t ( * hal_flash_ecc_error_cb_t ) ( hal_flash_handle_t * hflash )

HAL FLASH ECC error callback pointer definition

Enums

enum hal_flash_t

HAL FLASH instances enumeration definition

Values:

enumerator HAL_FLASH

FLASH Instance

enum hal_flash_program_mode_t

HAL FLASH program mode enumeration definition

Values:

enumerator HAL_FLASH_PROGRAM_QUADWORD

FLASH Quad-Word Programming mode

enumerator HAL_FLASH_PROGRAM_BURST

FLASH Burst Programming mode

enum hal_flash_bank_t

HAL FLASH bank enumeration definition

Values:

enumerator HAL_FLASH_BANK_1

FLASH bank 1

enumerator HAL_FLASH_BANK_2

FLASH bank 2

enumerator HAL_FLASH_BANK_ALL

FLASH all bank

enum hal_flash_state_t

HAL FLASH state enumeration definition

Values:

enumerator HAL_FLASH_STATE_RESET

FLASH not initialized

enumerator HAL_FLASH_STATE_IDLE

FLASH initialized and configured

enumerator HAL_FLASH_STATE_ACTIVE

FLASH process operation state

enum hal_flash_interrupted_operation_t

HAL FLASH interrupted operation enumeration definition

Values:

enumerator HAL_FLASH_INTERRUPTED_NO_OPERATION

LL FLASH interrupted no operation FLASH no interrupted operation

enumerator HAL_FLASH_INTERRUPTED_SINGLE_WRITE

LL FLASH interrupted single write FLASH interrupted single write

enumerator HAL_FLASH_INTERRUPTED_BURST_WRITE

LL FLASH interrupted burst write FLASH interrupted burst write

enumerator HAL_FLASH_INTERRUPTED_PAGE_ERASE

LL FLASH interrupted page erase FLASH interrupted page erase

enumerator HAL_FLASH_INTERRUPTED_BANK_ERASE

LL FLASH interrupted bank erase FLASH interrupted bank erase

enumerator HAL_FLASH_INTERRUPTED_MASS_ERASE

LL FLASH interrupted mass erase FLASH interrupted mass erase

enumerator HAL_FLASH_INTERRUPTED_OB_CHANGE

LL FLASH interrupted option bytes change FLASH interrupted option bytes change

enum hal_flash_ecc_fail_type_t

HAL FLASH ECC fail type enumeration definition

Values:

enumerator HAL_FLASH_ECC_FAIL_NONE

FLASH ECC fail none

enumerator HAL_FLASH_ECC_FAIL_ECCC

0x40000000 ECC correction LL FLASH ECC single error FLASH ECC fail correction

enumerator HAL_FLASH_ECC_FAIL_ECCD

0x80000000 ECC detection LL FLASH ECC double error FLASH ECC fail detection

enum hal_flash_operation_t

HAL FLASH operation enumeration definition

Values:

enumerator HAL_FLASH_NO_OPERATION

FLASH no operation

enumerator HAL_FLASH_PROGRAM

FLASH operation program

enumerator HAL_FLASH_ADDR_ERASE

FLASH operation address erase

enumerator HAL_FLASH_PAGE_ERASE

FLASH operation page erase

enumerator HAL_FLASH_BANK_ERASE

FLASH operation bank erase

enumerator HAL_FLASH_MASS_ERASE

FLASH operation mass erase

struct hal_flash_interrupted_by_reset_operation_info_t
#include <stm32u5xx_hal_flash.h>

HAL FLASH interrupted operation structure definition

Public Members

uint32_t addr

FLASH interrupted operation address

hal_flash_interrupted_operation_t operation

FLASH interrupted operation code

struct hal_flash_ecc_fail_info_t
#include <stm32u5xx_hal_flash.h>

HAL FLASH ECC fail information structure definition

Public Members

hal_flash_ecc_fail_type_t type

FLASH ECC fail type

uint32_t addr

FLASH ECC fail address

struct hal_flash_area_info_t
#include <stm32u5xx_hal_flash.h>

HAL FLASH area information structure definition

Public Members

uint32_t base_addr

FLASH area base address

uint32_t area_size_byte

FLASH area size in bytes

uint16_t page_nbr

FLASH number of pages

struct hal_flash_bank_info_t
#include <stm32u5xx_hal_flash.h>

HAL FLASH bank information structure definition

Public Members

uint8_t area_nbr

FLASH number of areas

uint32_t bank_size_byte

FLASH bank size in bytes

hal_flash_area_info_t user_flash

FLASH user area information structure

struct hal_flash_info_t
#include <stm32u5xx_hal_flash.h>

HAL FLASH information structure definition

Public Members

uint32_t flash_size_byte

FLASH total user area size in bytes

uint8_t bank_nbr

FLASH total number of banks

hal_flash_bank_info_t bank [ 0x2U ]

FLASH array of bank information structure

struct hal_flash_handle_s
#include <stm32u5xx_hal_flash.h>

HAL FLASH handle structure definition

Public Members

hal_flash_t instance

FLASH instance

volatile hal_flash_state_t global_state

FLASH global state

hal_flash_operation_t ongoing_operation

FLASH ongoing operation type

hal_flash_program_mode_t programming_mode

FLASH programming mode

uint32_t prog_data_addr

FLASH program user data buffer

uint32_t prog_flash_addr

FLASH program flash address

uint32_t adaptive_prog

FLASH adaptive programming

hal_flash_bank_t erase_bank

FLASH erase bank

uint32_t erase_page

FLASH erase page

int32_t count

FLASH program and erase count

uint32_t size

FLASH program or erase size byte or page number

hal_flash_ecc_fail_type_t type

FLASH ECC fail type

volatile uint32_t last_error_codes

FLASH last error codes

hal_flash_program_cplt_cb_t p_program_cplt_cb

FLASH program complete callback

hal_flash_erase_by_addr_cplt_cb_t p_erase_by_addr_cplt_cb

FLASH erase by address complete callback

hal_flash_erase_page_cplt_cb_t p_erase_page_cplt_cb

FLASH page erase complete callback

hal_flash_erase_bank_cplt_cb_t p_erase_bank_cplt_cb

FLASH bank erase complete callback

hal_flash_mass_erase_cplt_cb_t p_mass_erase_cplt_cb

FLASH mass erase complete callback

hal_flash_error_cb_t p_error_cb

FLASH error callback

hal_flash_ecc_error_cb_t p_ecc_error_cb

FLASH ECC error callback

const void * p_user_data

FLASH user data