This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ENET bootloader for STR912 - one more time

As you may guess I am getting very frustrated with attempts to write bootloader for the STR912 chip.

Here is what I got:

I THINK that I am booting from the bank 1

Here is my settings:

Using all settings from
http://www.keil.com/support/docs/3347.htm

Now to the RAM setup (I THINK this is needed for loading bootloader functions to RAM)


IRAM1 0x4000000 size 0x7FFF
IRAM2 (checked) 0x4008000 size 0x10000

Code Generation: ARM Mode

Program seems to start and run just fine

Now to ST library configuration

One thing is changed in 91xfmi.h
#define Remap_Bank_1 is uncommented

91x_fmi.c is placed to IRAM1 and file that calls functions in 91xfmi also placed to IRAM1

PROBLEM:

Call to FMI_EraseSector is with parameter 0x00400000. OK
Execution of the FIRST line

*(vu16 *)FMI_Sector = 0x20;


corrupts ENTIRE memory starting from address 0x00 and all the way through
call to
FMI_WaitForLastOperation
never returns, stuck in

LDR PC, Undef_Addr
undev Vectors - not surprising - context of the memory is gone!

this is the code

SCU_AHBPeriphClockConfig(__FMI, ENABLE);
SCU_AHBPeriphReset(__FMI, DISABLE);


    FMI_WriteProtectionCmd(FMI_B0S0, DISABLE);
    FMI_EraseSector(FMI_B0S0);
    FMI_Timeout_Status = FMI_WaitForLastOperation(FMI_BANK_0);

It appears that memory is erased, in bank 1! Program doesnt come back after power down â€" have to reprogram the flash.
Any help?

Thank you

0