Skip to main content
Visitor II
March 12, 2008
Question

I want to Program my code into 32K and write necessary data into 512k.

  • March 12, 2008
  • 17 replies
  • 2387 views
Posted on March 12, 2008 at 02:51

I want to Program my code into 32K and write necessary data into 512k.

    This topic has been closed for replies.

    17 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    left your email address here, then I'll contact you.

    best regards

    nanuradhaAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    Dear Barricade,

    thanks for u'r reply.

    my Mail Id is:

    mailto:mrajarao@hbl.in

    best regards.....

    nanuradhaAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    hi,

    I want to Program my code into 32K and write necessary data into 512k.

    What is the exact Configuration? i did so many configurations but no luck.

    Please help me regarding this.

    regards

    anuradha....

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    You've got post from me.

    Best regards

    Barricade

    nanuradhaAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    dear Barricade,

    i got your post. i will send u all configurations which i did. glance it and give u'r sugessions.

    thanks and regard....

    nanuradhaAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    hello ,

    now we able to program the code into 32K and write data into 256K. we are monitoring the data in Debug at memory window. But problem is its take time to complete the write operation. here i am sending my code please test my code and give u'r sugession.

    regards

    raj.......

    nanuradhaAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    Hai Barricade,

    We have enabled define Remap_Bank_1 in fmi.h file.Is it enough.We have tried the non boot bank address 0x400000 also.With that we are able to download the code but we are not able to write any data to this location.With 0x9000 loc we are able to write and read.But it is taking lot of time.If u r online please help us now.

    Anu.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    hello Raj,

    some remarks to your project what is different to mine

    1.) you use the ST-LIB as binary lib file

    i use direct the C- and H-files from the ST-LIB in the project (using own folder),

    that is better for changing something what you need (see 2.)) and for the optimizer,

    the #define DEBUG from the ST-LIB I've never used

    2.) if you have remapped the STR912 (run code from bank 1 at address 0)

    then you need also remap the ST-LIB, the code in 91x_fmi.h and 91x_fmi.c

    search for the word ''Remap_Bank_1'' in the c and h files,

    you have to set a global #define Remap_Bank_1 for the complete project !!!!

    3.) writing to the flash is only possible (on my experience)

    with a lower clock frequency (PLL off) with 25 Mhz. That's why my bootloader

    is running with 25 Mhz and the PLL is switched later on to 96 Mhz if I start

    start the project running in bank 0 (512 KByte).

    4.) in your main programm you have

    SCU_AHBPeriphClockConfig(__FMI, ENABLE);

    SCU_AHBPeriphReset(__FMI, DISABLE);

    from my opinon every programm on the STR912 start at address 0 from the flash (FMI),

    that means, the clock for the flash is per hardware default every time active, and you have not

    touch the clock for the FMI, so long you don't run software from RAM !

    5.) the address for the non boot bank in ''STR91x Bank1.s'' is definitive wrong.

    you have to use addresses like 0x80000, 0x100000, 0x180000, 0x200000, ....,0x400000 which are

    a multiply of 512 KByte = 0x80000. I use 0x400000.

    thats all for the first time, hoping I can help you

    Best regards

    B.

    P.S.: please correct me if i'm wrong on some points, this will also help the others and me

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    Hi,

    I ran into this problem earlier with my application, FMI_WaitForLastOperation() used to return FMI_TIMEOUT_ERROR for all half word writes after the first one. This appears to be a timing issue. A delay is required between two consecutive flash writes, hence I introduced a 40ms delay (it may also work with lesser delay) between the following instructions.

    *(vu16 *)FMI_Bank = 0xFF;

    ---->Delay 40ms here<--------

    if (Time_Out == TIMEOUT)

    Hope this helps.

    Regards,

    Vasisht.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    I repeat,

    you can't normaly not have any legal flash memory at address 0x9000

    bank1 (32 Kbyte)

    -> mapped to boot bank

    -> address range 0x0000-0x7FFF

    bank0 (512 Kbyte)

    -> mapped to non boot bank

    -> least address is legal 0x80000 (512 Kbyte address offset !!!!)

    -> range 0x80000-0xFFFFF, i use 0x400000-0x407FFFF

    with 0x9000 you and I, we don't know in which area you write, but is

    not e legal area.

    best regards