Hey have you got any solution of your problem? If yes, please convey it to me, i m also struck here only, not able to write from RAM to flash bank 0 sector 1..
Mohd, Do I have a problem that you know of :) ? Please explain what it is that you are trying to do. Please note that if you want to write to a cetain flash bank, you must switch to the other available bank - you cannot run from a bank and rewrite it at the same time! so if you want to write bank 0, you must to switch bank1 first.
Are you sure your piece of code is located in RAM?
Hey Michael, What i am trying to do is that i have kept my code in sector0 of bank0 and then i m trying to download a .srec executable file, i am sure it gets loaded in RAM but when i am trying to load it from RAM to sector1 bank 0 itself, it poses problems....I tried it to load in bank1 but no success....I m not getting the procedure to write on flash....I m using Keil uvision to load....a piece of code or suggestion will be helpful for me...Thanks for ur response :-)
You haven't told us where the code that performs the IAP is - remember that when programming the flash, the flash is not at the same time available for running any code.
mohd, wait a minute wait a minute wait a minute. what do you mean by "I m using Keil uvision to load"? do you mean that you load the program using microvision, or do you mean something else? first of all, acquaint yourself with www.st.com/.../12238.pdf, paragraph 4.2 in particular. then, make sure you know how to switch banks. you can find a very good reference here: www.st.com/.../modules.php search for AN2475 - you can download a .pdf and example code. hope this helps. by the way, its Tamir.
Thanks Tamir and Per for your quick responses.... The problem has solved...Now i have loaded my application in bank 1 and IAP in bank 0....Rite now i am explicitly putting the address of bank 1 in PC to run the application...Now the application is running....What i was missing is the use of FMI_WaitForLastOperation after ANY operation on Flash....Now its time to switch the banks....I have a link for it....Lets see....
C:\Documents and Settings\mohd.arif\Desktop\Discussions\MCBSTR9 BOOTING FROM FLASH BANK1.mht
I am using this link to switch the banks but i think its not working fine..... Can you tell me that how can i switch the banks and above that, how can i verify that YES my banks have switched.....
http://www.keil.com/support/docs/3347.htm This is the link i am using as a reference to switch banks....
i think its better to tell you that wat exactly i am doing.... Initially i have loaded IAP in 512 KB i.e bank0 and i have loaded application in 32 KB....working fine... Now i want to load IAP in 32KB and application in 512KB.... So i want to switch the banks....using STR91x.S and STR91xCFG.s and looking into that link, i am switching bank.... But then when i try to run that IAP of mine, by again changing the banks from ICP to normal, it is posing problems.... I am not sure about this whole procedure that its write or wrong to switch like this..
I don't work with your processor so I don't know exactly how it handles interrupts, but have you verified that the interrupt table for your application gets loaded into a memory area that the processor can use, or have you managed to copy the interrupt table into RAM and switch the ARM to use the RAM-based interrupt table?
It is normally quite easy to copy data to different banks, but the interrupt table is probably the biggest stumbling stone when it comes to getting the newly loaded application to work.
hi Per.. I was checking the threads and i got a statement that may help me..... "change the timeout values for the Bank 1 ICP flash programming options (changed to match bank 0 timeouts)" I dont know how to change this timeout value.. For ur information, I am using uVision3... Actually i got an error a short while ago while loading that "FLASH TIME OUT"... so i think it may help...