cancel
Showing results for 
Search instead for 
Did you mean: 

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

nanuradha
Associate II
Posted on March 12, 2008 at 02:51

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

17 REPLIES 17
nanuradha
Associate II
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....

d_steffen
Associate II
Posted on May 17, 2011 at 09:41

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

best regards

nanuradha
Associate II
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.....

d_steffen
Associate II
Posted on May 17, 2011 at 09:41

You've got post from me.

Best regards

Barricade

nanuradha
Associate II
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....

nanuradha
Associate II
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.......

bhushan_shanthi
Associate II
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.

d_steffen
Associate II
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

nanuradha
Associate II
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.