2009-01-06 08:58 PM
2011-05-17 12:54 AM
I've a problem with bank switch in STR912W42X6
I would use bank0 to restore data ,when i write data in FMI_B0S2 ,why FMI_B0S3 have same data with FMI_B0S2. __ramfunc u8 EepromFormat(){ u16 gg1,gg2 SCU_AHBPeriphClockConfig(__FMI, ENABLE); SCU_AHBPeriphReset(__FMI, DISABLE); SCU_PFQBCCmd(DISABLE); SCU_AHBPeriphReset(__VIC, ENABLE); FMI_BankRemapConfig(0x0, 0x6,0x80000, 0x0); FMI_WriteProtectionCmd(FMI_B0S2, DISABLE); FMI_WriteProtectionCmd(FMI_B0S3, ENABLE); FMI_EraseSector(FMI_B0S2); FMI_Timeout_Status1 = FMI_WaitForLastOperation(FMI_BANK_0); gg1=FMI_ReadWord(FMI_B0S2); if(gg1==0xffff) { FMI_WriteHalfWord( FMI_B0S2,0xAAAA );// write data to FMI_B0S2 FMI_WaitForLastOperation(FMI_BANK_0); } gg2= FMI_ReadWord(FMI_B0S3);//gg2 is the same whith FMI_B0S2 }