cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with FMI (STR912)

zhangying2000
Associate II
Posted on August 19, 2009 at 00:21

Problem with FMI (STR912)

2 REPLIES 2
zhangying2000
Associate II
Posted on May 17, 2011 at 11:32

the code will collapse when I run the below segment in KEIL.I think It's because the cpu frequency is too high,but after i slow down,problem is still. Why? thanks

SCU_AHBPeriphClockConfig(__FMI, ENABLE);

SCU_AHBPeriphReset(__FMI, DISABLE);

FMI_BankRemapConfig(0x4, 0x2, 0x0, 0x80000);

FMI_WriteProtectionCmd(FMI_B1S0, DISABLE);

FMI_EraseSector(FMI_B1S0);

FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_1); //dead in here

FMI_WriteHalfWord(0x80000,0xAAAA);

FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_1);

FMI_WriteHalfWord(0x80002,0xAAAA);

FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_1);

if(FMI_ReadWord(0x80000) == 0xAAAAAAAAUL)

{

LCD_SetCursor(0x42+countof(disp_ln2));

LCD_DISP_CHAR('T');

}

tomt
Associate II
Posted on May 17, 2011 at 11:32

Are you trying to remap the flash and/or program it while executing on the same bank? That would be a problem.