apps/flash_driver_api/src/fsl_flash.h
/*
* Copyright (c) 2013-2016, Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _FSL_FLASH_H_
#define _FSL_FLASH_H_
#include <stdint.h>
/*******************************************************************************
* Definitions
******************************************************************************/
#if !defined(MAKE_VERSION)
#define MAKE_VERSION(major, minor, bugfix) (((major) << 16) | ((minor) << 8) | (bugfix))
#endif
#define FSL_FLASH_DRIVER_VERSION (MAKE_VERSION(2, 1, 0))
enum _flash_driver_version_constants
{
kFLASH_DriverVersionName = 'F',
kFLASH_DriverVersionMajor = 2,
kFLASH_DriverVersionMinor = 1,
kFLASH_DriverVersionBugfix = 0
};
#if defined(kStatusGroup_FLASH)
#define kStatusGroupGeneric kStatusGroup_Generic
#define kStatusGroupFlashDriver kStatusGroup_FLASH
#define IS_GENERIC_STAUS_CODE_DEFINED 1
#else
#define kStatusGroupGeneric 0
#define kStatusGroupFlashDriver 1
#define IS_GENERIC_STAUS_CODE_DEFINED 0
#endif
#if !defined(MAKE_STATUS)
#define MAKE_STATUS(group, code) ((((group)*100) + (code)))
#endif
typedef int32_t status_t;
#if !(IS_GENERIC_STAUS_CODE_DEFINED)
enum _generic_status
{
kStatus_Success = MAKE_STATUS(kStatusGroupGeneric, 0),
kStatus_Fail = MAKE_STATUS(kStatusGroupGeneric, 1),
kStatus_ReadOnly = MAKE_STATUS(kStatusGroupGeneric, 2),
kStatus_OutOfRange = MAKE_STATUS(kStatusGroupGeneric, 3),
kStatus_InvalidArgument = MAKE_STATUS(kStatusGroupGeneric, 4)
};
#endif
enum _flash_status
{
kStatus_FLASH_Success = MAKE_STATUS(kStatusGroupGeneric, 0),
kStatus_FLASH_InvalidArgument = MAKE_STATUS(kStatusGroupGeneric, 4),
kStatus_FLASH_SizeError = MAKE_STATUS(kStatusGroupFlashDriver, 0),
kStatus_FLASH_AlignmentError =
MAKE_STATUS(kStatusGroupFlashDriver, 1),
kStatus_FLASH_AddressError = MAKE_STATUS(kStatusGroupFlashDriver, 2),
kStatus_FLASH_AccessError =
MAKE_STATUS(kStatusGroupFlashDriver, 3),
kStatus_FLASH_ProtectionViolation = MAKE_STATUS(
kStatusGroupFlashDriver, 4),
kStatus_FLASH_CommandFailure =
MAKE_STATUS(kStatusGroupFlashDriver, 5),
kStatus_FLASH_UnknownProperty = MAKE_STATUS(kStatusGroupFlashDriver, 6),
kStatus_FLASH_EraseKeyError = MAKE_STATUS(kStatusGroupFlashDriver, 7),
kStatus_FLASH_RegionExecuteOnly = MAKE_STATUS(kStatusGroupFlashDriver, 8),
kStatus_FLASH_ExecuteInRamFunctionNotReady =
MAKE_STATUS(kStatusGroupFlashDriver, 9),
kStatus_FLASH_PartitionStatusUpdateFailure =
MAKE_STATUS(kStatusGroupFlashDriver, 10),
kStatus_FLASH_SetFlexramAsEepromError =
MAKE_STATUS(kStatusGroupFlashDriver, 11),
kStatus_FLASH_RecoverFlexramAsRamError =
MAKE_STATUS(kStatusGroupFlashDriver, 12),
kStatus_FLASH_SetFlexramAsRamError = MAKE_STATUS(kStatusGroupFlashDriver, 13),
kStatus_FLASH_RecoverFlexramAsEepromError =
MAKE_STATUS(kStatusGroupFlashDriver, 14),
kStatus_FLASH_CommandNotSupported = MAKE_STATUS(kStatusGroupFlashDriver, 15),
kStatus_FLASH_SwapSystemNotInUninitialized =
MAKE_STATUS(kStatusGroupFlashDriver, 16),
kStatus_FLASH_SwapIndicatorAddressError =
MAKE_STATUS(kStatusGroupFlashDriver, 17),
};
#if !defined(FOUR_CHAR_CODE)
#define FOUR_CHAR_CODE(a, b, c, d) (((d) << 24) | ((c) << 16) | ((b) << 8) | ((a)))
#endif
enum _flash_driver_api_keys
{
kFLASH_ApiEraseKey = FOUR_CHAR_CODE('k', 'f', 'e', 'k')
};
typedef enum _flash_margin_value
{
kFLASH_MarginValueNormal,
kFLASH_MarginValueUser,
kFLASH_MarginValueFactory,
kFLASH_MarginValueInvalid
} flash_margin_value_t;
typedef enum _flash_security_state
{
kFLASH_SecurityStateNotSecure,
kFLASH_SecurityStateBackdoorEnabled,
kFLASH_SecurityStateBackdoorDisabled
} flash_security_state_t;
typedef enum _flash_protection_state
{
kFLASH_ProtectionStateUnprotected,
kFLASH_ProtectionStateProtected,
kFLASH_ProtectionStateMixed
} flash_protection_state_t;
typedef enum _flash_execute_only_access_state
{
kFLASH_AccessStateUnLimited,
kFLASH_AccessStateExecuteOnly,
kFLASH_AccessStateMixed
} flash_execute_only_access_state_t;
typedef enum _flash_property_tag
{
kFLASH_PropertyPflashSectorSize = 0x00U,
kFLASH_PropertyPflashTotalSize = 0x01U,
kFLASH_PropertyPflashBlockSize = 0x02U,
kFLASH_PropertyPflashBlockCount = 0x03U,
kFLASH_PropertyPflashBlockBaseAddr = 0x04U,
kFLASH_PropertyPflashFacSupport = 0x05U,
kFLASH_PropertyPflashAccessSegmentSize = 0x06U,
kFLASH_PropertyPflashAccessSegmentCount = 0x07U,
kFLASH_PropertyFlexRamBlockBaseAddr = 0x08U,
kFLASH_PropertyFlexRamTotalSize = 0x09U,
kFLASH_PropertyDflashSectorSize = 0x10U,
kFLASH_PropertyDflashTotalSize = 0x11U,
kFLASH_PropertyDflashBlockSize = 0x12U,
kFLASH_PropertyDflashBlockCount = 0x13U,
kFLASH_PropertyDflashBlockBaseAddr = 0x14U,
kFLASH_PropertyEepromTotalSize = 0x15U,
kFLASH_PropertyVersion = 0x20U,
} flash_property_tag_t;
enum _flash_execute_in_ram_function_constants
{
kFLASH_ExecuteInRamFunctionMaxSize = 64U,
kFLASH_ExecuteInRamFunctionTotalNum = 2U
};
typedef struct _flash_execute_in_ram_function_config
{
uint32_t activeFunctionCount;
uint8_t *flashRunCommand;
uint8_t *flashCacheClearCommand;
} flash_execute_in_ram_function_config_t;
typedef enum _flash_read_resource_option
{
kFLASH_ResourceOptionFlashIfr =
0x00U,
kFLASH_ResourceOptionVersionId = 0x01U
} flash_read_resource_option_t;
typedef void (*flash_callback_t)(void);
typedef struct _flash_config
{
uint32_t PFlashBlockBase;
uint32_t PFlashTotalSize;
uint32_t PFlashBlockCount;
uint32_t PFlashSectorSize;
flash_callback_t PFlashCallback;
uint32_t PFlashAccessSegmentSize;
uint32_t PFlashAccessSegmentCount;
uint32_t *flashExecuteInRamFunctionInfo;
uint32_t FlexRAMBlockBase;
uint32_t FlexRAMTotalSize;
uint32_t DFlashBlockBase;
uint32_t DFlashTotalSize;
uint32_t EEpromTotalSize;
} flash_config_t;
/*******************************************************************************
* API
******************************************************************************/
#if defined(__cplusplus)
extern "C" {
#endif
status_t FLASH_Init(flash_config_t *config);
status_t FLASH_SetCallback(flash_config_t *config, flash_callback_t callback);
status_t FLASH_PrepareExecuteInRamFunctions(flash_config_t *config);
status_t FLASH_EraseAll(flash_config_t *config, uint32_t key);
status_t FLASH_Erase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key);
status_t FLASH_EraseAllUnsecure(flash_config_t *config, uint32_t key);
status_t FLASH_EraseAllExecuteOnlySegments(flash_config_t *config, uint32_t key);
status_t FLASH_Program(flash_config_t *config, uint32_t start, uint32_t *src, uint32_t lengthInBytes);
status_t FLASH_ProgramOnce(flash_config_t *config, uint32_t index, uint32_t *src, uint32_t lengthInBytes);
status_t FLASH_ReadResource(
flash_config_t *config, uint32_t start, uint32_t *dst, uint32_t lengthInBytes, flash_read_resource_option_t option);
status_t FLASH_ReadOnce(flash_config_t *config, uint32_t index, uint32_t *dst, uint32_t lengthInBytes);
status_t FLASH_GetSecurityState(flash_config_t *config, flash_security_state_t *state);
status_t FLASH_SecurityBypass(flash_config_t *config, const uint8_t *backdoorKey);
status_t FLASH_VerifyEraseAll(flash_config_t *config, flash_margin_value_t margin);
status_t FLASH_VerifyErase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, flash_margin_value_t margin);
status_t FLASH_VerifyProgram(flash_config_t *config,
uint32_t start,
uint32_t lengthInBytes,
const uint32_t *expectedData,
flash_margin_value_t margin,
uint32_t *failedAddress,
uint32_t *failedData);
status_t FLASH_VerifyEraseAllExecuteOnlySegments(flash_config_t *config, flash_margin_value_t margin);
status_t FLASH_IsExecuteOnly(flash_config_t *config,
uint32_t start,
uint32_t lengthInBytes,
flash_execute_only_access_state_t *access_state);
status_t FLASH_GetProperty(flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value);
#if defined(__cplusplus)
}
#endif
#endif /* _FSL_FLASH_H_ */
kFLASH_ProtectionStateMixed
Definition: apps/flash_driver_api/src/fsl_flash.h:191
kFLASH_SecurityStateBackdoorDisabled
Definition: apps/flash_driver_api/src/fsl_flash.h:181
kFLASH_PropertyPflashAccessSegmentSize
Definition: apps/flash_driver_api/src/fsl_flash.h:215
kStatus_FLASH_SetFlexramAsEepromError
Definition: apps/flash_driver_api/src/fsl_flash.h:126
kFLASH_ExecuteInRamFunctionTotalNum
Definition: apps/flash_driver_api/src/fsl_flash.h:235
FLASH_ReadOnce
status_t FLASH_ReadOnce(flash_config_t *config, uint32_t index, uint32_t *dst, uint32_t lengthInBytes)
Read Program Once Field through parameters.
Definition: fsl_flash_api_tree.c:294
kStatus_FLASH_CommandNotSupported
Definition: apps/flash_driver_api/src/fsl_flash.h:133
kStatus_FLASH_RecoverFlexramAsRamError
Definition: apps/flash_driver_api/src/fsl_flash.h:128
FLASH_EraseAll
status_t FLASH_EraseAll(flash_config_t *config, uint32_t key)
Erases entire flash.
Definition: fsl_flash_api_tree.c:152
kFLASH_ApiEraseKey
Definition: apps/flash_driver_api/src/fsl_flash.h:159
status_t
int32_t status_t
Type used for all status and error return values.
Definition: apps/flash_driver_api/src/fsl_flash.h:88
FLASH_VerifyEraseAll
status_t FLASH_VerifyEraseAll(flash_config_t *config, flash_margin_value_t margin)
Verifies erasure of entire flash at specified margin level.
Definition: fsl_flash_api_tree.c:218
kFLASH_PropertyPflashTotalSize
Definition: apps/flash_driver_api/src/fsl_flash.h:210
FLASH_IsExecuteOnly
status_t FLASH_IsExecuteOnly(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, flash_execute_only_access_state_t *access_state)
Returns the access state of desired flash area via the pointer passed into the function.
Definition: fsl_flash.c:1505
kFLASH_ExecuteInRamFunctionMaxSize
Definition: apps/flash_driver_api/src/fsl_flash.h:234
kStatus_FLASH_RegionExecuteOnly
Definition: apps/flash_driver_api/src/fsl_flash.h:121
kFLASH_MarginValueUser
Definition: apps/flash_driver_api/src/fsl_flash.h:169
FLASH_Init
status_t FLASH_Init(flash_config_t *config)
Initializes global flash properties structure members.
Definition: fsl_flash_api_tree.c:142
kFLASH_DriverVersionName
Definition: apps/flash_driver_api/src/fsl_flash.h:60
flash_read_resource_option_t
flash_read_resource_option_t
Enumeration for the two possible options of flash read resource command.
Definition: apps/flash_driver_api/src/fsl_flash.h:251
flash_margin_value_t
flash_margin_value_t
Enumeration for supported flash margin levels.
Definition: apps/flash_driver_api/src/fsl_flash.h:166
flash_read_resource_option_t
flash_read_resource_option_t
Enumeration for the two possible options of flash read resource command.
Definition: src/drivers/flash/fsl_flash.h:273
kStatus_FLASH_RecoverFlexramAsEepromError
Definition: apps/flash_driver_api/src/fsl_flash.h:131
kStatus_FLASH_CommandFailure
Definition: apps/flash_driver_api/src/fsl_flash.h:117
kStatus_FLASH_SwapIndicatorAddressError
Definition: apps/flash_driver_api/src/fsl_flash.h:136
_flash_execute_in_ram_function_constants
_flash_execute_in_ram_function_constants
Constants for execute-in-ram flash function.
Definition: src/drivers/flash/fsl_flash.h:254
kFLASH_PropertyDflashBlockBaseAddr
Definition: apps/flash_driver_api/src/fsl_flash.h:223
FLASH_Erase
status_t FLASH_Erase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key)
Erases flash sectors encompassed by parameters passed into function.
Definition: fsl_flash_api_tree.c:167
flash_execute_in_ram_function_config_t
Flash execute-in-ram function information.
Definition: src/drivers/flash/fsl_flash.h:263
kFLASH_PropertyPflashSectorSize
Definition: apps/flash_driver_api/src/fsl_flash.h:209
FLASH_EraseAllExecuteOnlySegments
status_t FLASH_EraseAllExecuteOnlySegments(flash_config_t *config, uint32_t key)
Erases all program flash execute-only segments defined by the FXACC registers.
Definition: fsl_flash.c:713
kFLASH_PropertyPflashBlockSize
Definition: apps/flash_driver_api/src/fsl_flash.h:211
kFLASH_MarginValueInvalid
Definition: apps/flash_driver_api/src/fsl_flash.h:171
FLASH_GetSecurityState
status_t FLASH_GetSecurityState(flash_config_t *config, flash_security_state_t *state)
Returns the security state via the pointer passed into the function.
Definition: fsl_flash_api_tree.c:204
kFLASH_PropertyDflashSectorSize
Definition: apps/flash_driver_api/src/fsl_flash.h:219
FLASH_VerifyErase
status_t FLASH_VerifyErase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, flash_margin_value_t margin)
Verifies erasure of desired flash area at specified margin level.
Definition: fsl_flash_api_tree.c:225
kFLASH_PropertyPflashAccessSegmentCount
Definition: apps/flash_driver_api/src/fsl_flash.h:216
kFLASH_AccessStateExecuteOnly
Definition: apps/flash_driver_api/src/fsl_flash.h:200
FLASH_ReadResource
status_t FLASH_ReadResource(flash_config_t *config, uint32_t start, uint32_t *dst, uint32_t lengthInBytes, flash_read_resource_option_t option)
Read resource with data at locations passed in through parameters.
Definition: fsl_flash_api_tree.c:280
_generic_status
_generic_status
Generic status return codes.
Definition: fsl_common.h:109
kStatus_FLASH_SizeError
Definition: apps/flash_driver_api/src/fsl_flash.h:109
FLASH_SecurityBypass
status_t FLASH_SecurityBypass(flash_config_t *config, const uint8_t *backdoorKey)
Allows user to bypass security with a backdoor key.
Definition: fsl_flash_api_tree.c:211
kStatus_FLASH_UnknownProperty
Definition: apps/flash_driver_api/src/fsl_flash.h:119
_flash_status
_flash_status
Flash driver status codes.
Definition: src/drivers/flash/fsl_flash.h:129
kFLASH_PropertyDflashBlockCount
Definition: apps/flash_driver_api/src/fsl_flash.h:222
kFLASH_PropertyFlexRamBlockBaseAddr
Definition: apps/flash_driver_api/src/fsl_flash.h:217
FLASH_GetProperty
status_t FLASH_GetProperty(flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value)
Returns the desired flash property.
Definition: fsl_flash_api_tree.c:246
kFLASH_PropertyPflashBlockBaseAddr
Definition: apps/flash_driver_api/src/fsl_flash.h:213
FLASH_PrepareExecuteInRamFunctions
status_t FLASH_PrepareExecuteInRamFunctions(flash_config_t *config)
Prepare flash execute-in-ram functions.
Definition: fsl_flash.c:549
FLASH_Program
status_t FLASH_Program(flash_config_t *config, uint32_t start, uint32_t *src, uint32_t lengthInBytes)
Programs flash with data at locations passed in through parameters.
Definition: fsl_flash_api_tree.c:197
kFLASH_PropertyPflashFacSupport
Definition: apps/flash_driver_api/src/fsl_flash.h:214
flash_protection_state_t
flash_protection_state_t
Enumeration for the three possible flash protection levels.
Definition: apps/flash_driver_api/src/fsl_flash.h:187
kFLASH_ResourceOptionFlashIfr
Definition: apps/flash_driver_api/src/fsl_flash.h:253
kStatus_FLASH_InvalidArgument
Definition: apps/flash_driver_api/src/fsl_flash.h:108
flash_property_tag_t
flash_property_tag_t
Enumeration for various flash properties.
Definition: apps/flash_driver_api/src/fsl_flash.h:207
flash_execute_only_access_state_t
flash_execute_only_access_state_t
Enumeration for the three possible flash execute access levels.
Definition: apps/flash_driver_api/src/fsl_flash.h:197
kFLASH_PropertyFlexRamTotalSize
Definition: apps/flash_driver_api/src/fsl_flash.h:218
flash_property_tag_t
flash_property_tag_t
Enumeration for various flash properties.
Definition: src/drivers/flash/fsl_flash.h:231
kStatus_FLASH_SetFlexramAsRamError
Definition: apps/flash_driver_api/src/fsl_flash.h:130
flash_callback_t
void(* flash_callback_t)(void)
callback type used for pflash block
Definition: apps/flash_driver_api/src/fsl_flash.h:259
FLASH_VerifyProgram
status_t FLASH_VerifyProgram(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, const uint32_t *expectedData, flash_margin_value_t margin, uint32_t *failedAddress, uint32_t *failedData)
Verifies programming of desired flash area at specified margin level.
Definition: fsl_flash_api_tree.c:232
kFLASH_ProtectionStateUnprotected
Definition: apps/flash_driver_api/src/fsl_flash.h:189
kFLASH_SecurityStateBackdoorEnabled
Definition: apps/flash_driver_api/src/fsl_flash.h:180
FLASH_ProgramOnce
status_t FLASH_ProgramOnce(flash_config_t *config, uint32_t index, uint32_t *src, uint32_t lengthInBytes)
Programs Program Once Field through parameters.
Definition: fsl_flash_api_tree.c:267
flash_security_state_t
flash_security_state_t
Enumeration for the three possible flash security states.
Definition: src/drivers/flash/fsl_flash.h:201
kFLASH_ResourceOptionVersionId
Definition: apps/flash_driver_api/src/fsl_flash.h:255
kFLASH_PropertyPflashBlockCount
Definition: apps/flash_driver_api/src/fsl_flash.h:212
flash_margin_value_t
flash_margin_value_t
Enumeration for supported flash margin levels.
Definition: src/drivers/flash/fsl_flash.h:190
kStatus_FLASH_PartitionStatusUpdateFailure
Definition: apps/flash_driver_api/src/fsl_flash.h:124
kStatus_FLASH_Success
Definition: apps/flash_driver_api/src/fsl_flash.h:107
_flash_driver_api_keys
_flash_driver_api_keys
Enumeration for flash driver API keys.
Definition: src/drivers/flash/fsl_flash.h:181
flash_config_t
Flash driver state information.
Definition: src/drivers/flash/fsl_flash.h:443
kFLASH_PropertyVersion
Definition: apps/flash_driver_api/src/fsl_flash.h:226
kFLASH_AccessStateUnLimited
Definition: apps/flash_driver_api/src/fsl_flash.h:199
kStatus_FLASH_ProtectionViolation
Definition: apps/flash_driver_api/src/fsl_flash.h:115
FLASH_EraseAllUnsecure
status_t FLASH_EraseAllUnsecure(flash_config_t *config, uint32_t key)
Erases entire flash, including protected sectors.
Definition: fsl_flash_api_tree.c:182
kStatus_FLASH_AddressError
Definition: apps/flash_driver_api/src/fsl_flash.h:112
kStatus_FLASH_AlignmentError
Definition: apps/flash_driver_api/src/fsl_flash.h:110
flash_execute_only_access_state_t
flash_execute_only_access_state_t
Enumeration for the three possible flash execute access levels.
Definition: src/drivers/flash/fsl_flash.h:221
kFLASH_SecurityStateNotSecure
Definition: apps/flash_driver_api/src/fsl_flash.h:179
kStatus_FLASH_SwapSystemNotInUninitialized
Definition: apps/flash_driver_api/src/fsl_flash.h:134
kFLASH_PropertyEepromTotalSize
Definition: apps/flash_driver_api/src/fsl_flash.h:224
kFLASH_MarginValueFactory
Definition: apps/flash_driver_api/src/fsl_flash.h:170
kStatus_FLASH_AccessError
Definition: apps/flash_driver_api/src/fsl_flash.h:113
kFLASH_MarginValueNormal
Definition: apps/flash_driver_api/src/fsl_flash.h:168
kFLASH_AccessStateMixed
Definition: apps/flash_driver_api/src/fsl_flash.h:201
FLASH_VerifyEraseAllExecuteOnlySegments
status_t FLASH_VerifyEraseAllExecuteOnlySegments(flash_config_t *config, flash_margin_value_t margin)
Verifies if the program flash executeonly segments have been erased to the specified read margin leve...
Definition: fsl_flash.c:1353
kFLASH_DriverVersionMajor
Definition: apps/flash_driver_api/src/fsl_flash.h:61
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:121
kStatus_FLASH_ExecuteInRamFunctionNotReady
Definition: apps/flash_driver_api/src/fsl_flash.h:122
kStatus_FLASH_EraseKeyError
Definition: apps/flash_driver_api/src/fsl_flash.h:120
kFLASH_DriverVersionMinor
Definition: apps/flash_driver_api/src/fsl_flash.h:62
kFLASH_ProtectionStateProtected
Definition: apps/flash_driver_api/src/fsl_flash.h:190
kFLASH_PropertyDflashTotalSize
Definition: apps/flash_driver_api/src/fsl_flash.h:220
FLASH_SetCallback
status_t FLASH_SetCallback(flash_config_t *config, flash_callback_t callback)
Set the desired flash callback function.
Definition: fsl_flash_api_tree.c:307
kFLASH_PropertyDflashBlockSize
Definition: apps/flash_driver_api/src/fsl_flash.h:221
flash_security_state_t
flash_security_state_t
Enumeration for the three possible flash security states.
Definition: apps/flash_driver_api/src/fsl_flash.h:177
kFLASH_DriverVersionBugfix
Definition: apps/flash_driver_api/src/fsl_flash.h:63