cancel
Showing results for 
Search instead for 
Did you mean: 

Save data in internal flash bank1 or parts of bank0

info80
Associate II
Posted on January 30, 2007 at 17:18

Save data in internal flash bank1 or parts of bank0

3 REPLIES 3
info80
Associate II
Posted on May 17, 2011 at 09:35

Hallo

I'm using Keil-compiler and board MCB-STR9 with STR912FW44 and I would like to use flash-bank1 or parts of bank0 as data-storage. What is the simpliest way for this? The example on Keil\ST is as follow:

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

FMI_WriteProtectionCmd(FMI_B1S0, DISABLE);

FMI_EraseSector(FMI_B1S0);

FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_1);

FMI_WriteHalfWord(0x80000,0x1111);

FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_1);

FMI_WriteHalfWord(0x80002,0x1111);

FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_1);

Why have I to remap? I't doesn't work.

Please help me, thanks

hd2
Associate II
Posted on May 17, 2011 at 09:35

FYI, this doesn't seem to work in IAR with the STR910-EVAL either...at least not well. The debugger shows the memory being changed, but reading it with ST's standalone JTAG tool shows the data not being what was just written. Of course, you cannot write to the same bank you are running from (must relocate to RAM or write to the other bank). Even then, I'm fighting the same problems.

Good Luck, and if you find anything please update this posting.

jonny_bee_henry
Associate II
Posted on May 17, 2011 at 09:35

Here's another data point.

Yesterday I used the code in ST's FMI sample program, which looks like the same code you are using, and it worked as expected on the IAR development system. I can write flash memory with one program, and read the values back with another.

[I did not compile and run the sample program, but copied its code into my own working program. So my general initialization is different from the sample program, but I don't think that matters.]