#define MY_FLASH_LOCATION 0x00007C00 /* Flash memory location the data will be written to */
volatile bool DataWrittenFlg = FALSE;
LDD_TError Error;
LDD_FLASH_TOperationStatus OpStatus;
LDD_TDeviceData *MyFLASH_Ptr;
//UInt16 DataTest[] = {0,1,2,3,4,5,6,7,8,9};
//UInt16 *pClbrtData = 0;
void SaveClbrtData(void)
{
static UInt16 Cnt = 0;
MyFLASH_Ptr = FLASH1_Init(NULL); /* Initialization of FLASH1 component */
Error = FLASH1_Erase(MyFLASH_Ptr, MY_FLASH_LOCATION, 1024); /* Start erase to the flash memory */
/* Here some other application code can be placed */
while (!DataWrittenFlg)
{ /* Wait until the data are written */
FLASH1_Main(MyFLASH_Ptr); /* Run the main method */
Cnt++;
if(Cnt > 300)
{
break;
}
}
Device: MC56F82748
dear NXP expert,
i try to erase a sector .p_FlashData (RWX) : ORIGIN = 0x00007C00, LENGTH = 0x00000400,
i am sure the FTFA_PDD_SetFCCOBCommand and FTFA_PDD_SetFCCOBAddress set as expected, no memory protected, FTFA_FPROTn bits are all 1.But i the memory corresponding no change to 0xFFFF, is there any operation need further?
thanks.