ParaLib 2.0.28-master SHA: b4a0dafd73
PARA_Flash_STM32H5.h File Reference
#include "lib/Para/SYS_Type.h"
#include "lib/Para/PARA_Lib.h"

Go to the source code of this file.

Macros

#define PARA_FLASH_FLAG_READ_ACTIVE   (1<<0)
 
#define PARA_FLASH_FLAG_DECC_ACTIVE   (1<<1)
 

Functions

void PARA_FlashInit (void)
 Initialization of parameter flash interface needs to be called before: More...
 
void PARA_FlashReadFromBackup (uint16_t location, ParameterAccessSource Access, uint8_t AccessLevel)
 Reads backup-values from flash and stores them into parameter values. More...
 
bool PARA_FlashWriteToBackup (uint16_t location)
 Writes backup-values into flash All parameters with storage-location selected in parameter location are processed, all others are ignored. More...
 
bool PARA_FlashRestoreDefaults (uint16_t location, ParameterAccessSource Access, uint8_t AccessLevel)
 
bool ParaFlashNMIHandler (void)
 NMI is called in case of a double ECC Error. More...
 
uint32_t GetFlashWriteCount (void)
 

Variables

uint32_t g_ui32ParaFlashFlags
 
uint32_t g_ui32ECCErrorAddress
 

Macro Definition Documentation

◆ PARA_FLASH_FLAG_DECC_ACTIVE

#define PARA_FLASH_FLAG_DECC_ACTIVE   (1<<1)

◆ PARA_FLASH_FLAG_READ_ACTIVE

#define PARA_FLASH_FLAG_READ_ACTIVE   (1<<0)

Function Documentation

◆ GetFlashWriteCount()

uint32_t GetFlashWriteCount ( void  )

◆ PARA_FlashInit()

void PARA_FlashInit ( void  )

Initialization of parameter flash interface needs to be called before:

  • HAL Init
  • PARA_Init
  • Error_Init
  • SystemMessage_Init
  • PARA_Backup_Init

◆ PARA_FlashReadFromBackup()

void PARA_FlashReadFromBackup ( uint16_t  location,
ParameterAccessSource  Access,
uint8_t  AccessLevel 
)

Reads backup-values from flash and stores them into parameter values.

All parameters with storage-location selected in parameter location are processed, all others are ignored. The parameter values are written with the OnWrite-function defined in the parameter itself. In case of an error, the default value is set.

Parameters
locationselects the storage location
AccessSource of access (see Access restrictions).
AccessLevelActual AccessLevel (see Access restrictions).

All parameters with storage-location selected in parameter location are processed, all others are ignored. The parameter values are written with the OnWrite-function defined in the parameter itself. In case of an error, the default value is set. Flash must be unlocked!

Parameters
locationselects the storage location
AccessSource of access (see Access restrictions).
AccessLevelActual AccessLevel (see Access restrictions).

◆ PARA_FlashRestoreDefaults()

bool PARA_FlashRestoreDefaults ( uint16_t  location,
ParameterAccessSource  Access,
uint8_t  AccessLevel 
)

◆ PARA_FlashWriteToBackup()

bool PARA_FlashWriteToBackup ( uint16_t  location)

Writes backup-values into flash All parameters with storage-location selected in parameter location are processed, all others are ignored.

Parameters
locationselects the storage location
Return values
Trueif successfull.

◆ ParaFlashNMIHandler()

bool ParaFlashNMIHandler ( void  )

NMI is called in case of a double ECC Error.

If this occures while reading Parameter flash, set flag and return from NMI.

Variable Documentation

◆ g_ui32ECCErrorAddress

uint32_t g_ui32ECCErrorAddress
extern

◆ g_ui32ParaFlashFlags

uint32_t g_ui32ParaFlashFlags
extern