/********************************************************************/
/*!
* \brief flash Identify
* \return None
*
* This is primarly a reporting function that displays information
* about the specific flash parameters and flash version ID for
* the current device. These parameters are obtained using a special
* flash command call "read resource." The first four bytes returned
* are the flash parameter revision, and the second four bytes are
* the flash version ID.
*/
void flash_identify (void)
{
/* Get the flash parameter version and flash version ID */
/* Write the flash FCCOB registers with the values for a read resource command */
FTFE_FCCOB0 = 0x03;
FTFE_FCCOB1 = 0x00;
FTFE_FCCOB2 = 0x00;
FTFE_FCCOB3 = 0x08;
FTFE_FCCOB4 = 0x01;
/* All required FCCOBx registers are written, so launch the command */
FTFE_FSTAT = FTFE_FSTAT_CCIF_MASK;
/* Wait for the command to complete */
while(!(FTFE_FSTAT & FTFE_FSTAT_CCIF_MASK));
printf("Flash parameter version %d.%d.%d.%d\n",FTFE_FCCOB4,FTFE_FCCOB5,FTFE_FCCOB6,FTFE_FCCOB7);
printf("Flash version ID %d.%d.%d.%d\n",FTFE_FCCOB8,FTFE_FCCOB9,FTFE_FCCOBA,FTFE_FCCOBB);
/* Clear all of the flags in the flash status register */
FTFE_FSTAT = 0xFF;
}