mcu/drv/fsl_flash_driver_c90tfs.c
/*FUNCTION**********************************************************************
 *
 * Function Name : FlashEraseAllBlockUnsecure
 * Description   : Erases all Flash memory, initializes the FlexRAM, verifies
 * all memory contents, and then releases the MCU security.
 *
 * Implements    : FlashEraseAllBlockUnsecure_Activity
 *END**************************************************************************/
FUNCTION

Function Name : FlashEraseAllBlockUnsecure
Description   : Erases all Flash memory, initializes the FlexRAM, verifies
all memory contents, and then releases the MCU security.

Implements    : FlashEraseAllBlockUnsecure_Activity
END
FUNCTION Function Name : FlashEraseAllBlockUnsecure Description : Erases all Flash memory initializes the FlexRAM verifies all memory contents and then releases the MCU security . Implements : FlashEraseAllBlockUnsecure_Activity END
flash_drv_status_t FlashEraseAllBlockUnsecure (const flash_ssd_config_t * pSSDConfig, \
                                               flash_command_sequence_t pFlashCommandSequence)
{
#ifdef DEV_ERROR_DETECT
    DEV_ASSERT(pSSDConfig != NULL);
    DEV_ASSERT(pFlashCommandSequence != NULL);
#endif
    flash_drv_status_t ret;    
    CLEAR_FTFx_FSTAT_ERROR_BITS;
    FTFx_FCCOB0 = FTFx_ERASE_ALL_BLOCK_UNSECURE;
    ret = pFlashCommandSequence(pSSDConfig);
    return (ret);
}
flash_drv_status_t FlashEraseAllBlockUnsecure ( const flash_ssd_config_t * pSSDConfig , flash_command_sequence_t pFlashCommandSequence ) { #ifdef DEV_ERROR_DETECT DEV_ASSERT ( pSSDConfig != NULL ) ; DEV_ASSERT ( pFlashCommandSequence != NULL ) ; #endif flash_drv_status_t ret ; CLEAR_FTFx_FSTAT_ERROR_BITS ; FTFx_FCCOB0 = FTFx_ERASE_ALL_BLOCK_UNSECURE ; ret = pFlashCommandSequence ( pSSDConfig ) ; return ( ret ) ; }
FUNCTION
FUNCTION
/* Return code variable */ /* Clear RDCOLERR & ACCERR & FPVIOL flag in flash status register. Write 1 to clear */ /* Passing parameter to the command */ /* Calling flash command sequence function to execute the command */