This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
void App_FlashUpdate(void) { Fapi_StatusType oReturnCheck; Fapi_FlashStatusType oFlashStatus; Uint16 u16Temp[8] = {0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; DINT; EALLOW; oReturnCheck = Fapi_initializeAPI(FlashTech_CPU0_BASE_ADDRESS,120); if(oReturnCheck != Fapi_Status_Success) { App_WaitRestart(); } oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0); if(oReturnCheck != Fapi_Status_Success) { App_WaitRestart(); } ClearFSMStatus(); Fapi_setupBankSectorEnable(FLASH_WRAPPER_PROGRAM_BASE+FLASH_O_CMDWEPROTA, 0xFFFFFFFF); Fapi_setupBankSectorEnable(FLASH_WRAPPER_PROGRAM_BASE+FLASH_O_CMDWEPROTB, 0x00000000); oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)0x08EFF8,u16Temp, 8,0,0, Fapi_AutoEccGeneration); while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); if(oReturnCheck != Fapi_Status_Success) { App_WaitRestart(); // Check Flash API documentation for possible errors } DEVICE_DELAY_US(100); oFlashStatus = Fapi_getFsmStatus(); if (oFlashStatus != 3) { App_WaitRestart(); } EDIS; App_WaitRestart(); }
目的是将0x8EFF8的值0xbbbb写为0x0000