HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
Loading...
Searching...
No Matches
flash_check.h File Reference

Function to check flash CRC. More...

#include "sarmfsw.h"
Include dependency graph for flash_check.h:
This graph shows which files directly or indirectly include this file:

Functions

uint32_t Get_app_start_address (void)
 Get Application start address.
 
uint32_t Get_app_size (void)
 Get Application size.
 
FctERR flash_crc_check (void)
 Application Flash CRC check.
 
FctERR flash_full_crc_check (void)
 Flash CRC check (complete FLASH area)
 

Detailed Description

Function to check flash CRC.

Author
SMFSW

Function Documentation

◆ flash_crc_check()

FctERR flash_crc_check ( void )

Application Flash CRC check.

Note
Assuming flash crc to check against is located in the last 4bytes of application reserved flash
Get_app_start_address & Get_app_size needs to be implemented in project, otherwise acts as flash_crc_check
Return values
ERROR_OK- Flash CRC consistent
ERROR_CRC- Flash CRC inconsistent
Here is the call graph for this function:

◆ flash_full_crc_check()

FctERR flash_full_crc_check ( void )

Flash CRC check (complete FLASH area)

Note
Assuming flash crc to check against is located in the last 4bytes of flash
Ideal when application takes the whole FLASH area, otherwise use flash_crc_check instead
Return values
ERROR_OK- Flash CRC consistent
ERROR_CRC- Flash CRC inconsistent
Here is the call graph for this function:

◆ Get_app_size()

uint32_t Get_app_size ( void )

Get Application size.

Weak Functions
Function declared as weak, needs to be customly implemented in user code, otherwise returns FLASH_SIZE value
Returns
Application size
Here is the caller graph for this function:

◆ Get_app_start_address()

uint32_t Get_app_start_address ( void )

Get Application start address.

Weak Functions
Function declared as weak, needs to be customly implemented in user code, otherwise returns FLASH_BASE value
Returns
Application start address
Here is the caller graph for this function: