Skip to main content
Visitor II
August 18, 2009
Question

Problem with FMI (STR912)

  • August 18, 2009
  • 2 replies
  • 768 views
Posted on August 19, 2009 at 00:21

Problem with FMI (STR912)

    This topic has been closed for replies.

    2 replies

    Visitor II
    May 17, 2011
    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');

    }

    Visitor II
    May 17, 2011
    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.