| Details | Message |
|---|
Read-Only Author Mohd Arif Posted 4-May-2008 02:01 Toolset ARM |  Problem in writing from RAM to Flash in STR912 Mohd Arif 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.. |
|
Read-Only Author Tamir Michael Posted 4-May-2008 06:36 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Tamir Michael 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. |
|
Read-Only Author Tamir Michael Posted 4-May-2008 07:08 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Tamir Michael Are you sure your piece of code is located in RAM? |
|
Read-Only Author Mohd Arif Posted 4-May-2008 10:39 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Mohd Arif 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 :-) |
|
Read-Only Author Per Westermark Posted 4-May-2008 13:24 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Per Westermark 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. |
|
Read-Only Author Tamir Michael Posted 4-May-2008 14:33 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Tamir Michael 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 http://www.st.com/stonline/products/literature/um/12238.pdf, paragraph 4.2 in particular. then, make sure you know how to switch banks. you can find a very good reference here: http://www.st.com/mcu/modules.php?name=mcu&file=familiesdocs&fam=101&doc=3&doc=7&doc=6&doc=35&doc=76&doc=9&doc=15&doc=14&doc=78&doc=60&doc=59&doc=21&doc=54 search for AN2475 - you can download a .pdf and example code. hope this helps. by the way, its Tamir. |
|
Read-Only Author Mohd Arif Posted 5-May-2008 02:11 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Mohd Arif 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.... |
|
Read-Only Author Mohd Arif Posted 6-May-2008 23:46 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Mohd Arif 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..... |
|
Read-Only Author Mohd Arif Posted 6-May-2008 23:54 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Mohd Arif http://www.keil.com/support/docs/3347.htm This is the link i am using as a reference to switch banks.... |
|
Read-Only Author Mohd. Arif Posted 7-May-2008 00:01 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Mohd. Arif 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.. |
|
Read-Only Author Per Westermark Posted 7-May-2008 00:09 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Per Westermark 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. |
|
Read-Only Author Mohd. Arif Posted 7-May-2008 00:22 Toolset ARM |  RE: Problem in writing from RAM to Flash in STR912 Mohd. Arif 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... |
|