最近在修改eboot,(ep9315的cpu)现在发现有个擦flash的问题,运行到
Continue to Erase the rest of Flash.
*pFlash = EA0003FF .
ERROR: Error while erasing flash
就发生错误
不是硬件的问题,因为用自带的就可以,不过没源码
这个是源码
BOOL FinishEraseFlashJ3_2x16 (void)
{
BOOL bSuccess;
//
// Check to see if the flash has been completely erased. If so just
// return.
//
if(gbFlashEraseComplete)
{
return TRUE;
}
//
// Wait for the Flash block command to succed.
//
bSuccess = WaitForReady(gpulCurAddr, 10000, EXT_STATUS_WBUFFER_READY);
if(bSuccess == FALSE)
{
return FALSE;
}
*gpulCurAddr = FLASH_CLEAR_STATUS;
//
// Erase the block before unlocking the next block.
//
if(gbUnlocked)
{
//
// Erase the flash block
//
*gpulCurAddr = FLASH_BLOCK_ERASE;
*gpulCurAddr = FLASH_BLOCK_ERASE_RESUME;