cancel
Showing results for 
Search instead for 
Did you mean: 

Can i write Main Flash Of uPSD3454EV......

jagtap
Associate II
Posted on May 22, 2009 at 08:13

Can i write Main Flash Of uPSD3454EV......

3 REPLIES 3
jagtap
Associate II
Posted on May 17, 2011 at 11:52

hi friends.......

Can i write Main Flash Of uPSD3454EV when my program memory is main flash. if yes how can i? i wan't to write 7th bank as data space( csboot 0,1,2,3 are already i am using for data space) and use bank 1 to 6 for program space.

Thank You

Somnath h. Jagtap

tim5
Associate II
Posted on May 17, 2011 at 11:52

No it is not possible to program or erase a flash bank while you are executing from it. To do what you want you will need to reserve an area of a CS bank for a small program to do the writing. Then write the desired data to RAM, switch program banks, execute your flash-write program in CS to copy from RAM to FS, then switch back to FS program.

If you don't have the code address space to make your CS and FS code visible simultaneously, then use an absolutely located switching routine (eg directly above the interrupt table or at the top of address space. I think it has to be written in assembler) and put a copy at the same address in both banks, then you can switch on the fly without missing a beat, but remember to clear the branch cache (as described in the datasheet) before exiting the duplicate area, and remember your interrupt service routines won't be visible while you are there.

If you do an FS erase, it can't be done in the background in this situation, you must have the relevant FS page in data and be executing in CS for the duration of the erase, in real time.

It does work, honest, I've done it. I've even got interrupts being handled in CS while an application program executes in FS. (I haven't been able to get code in FS to read data in FS though, as I posted elsewhere. I get a feeling you are going to need that.)

Tim Jackson

jagtap
Associate II
Posted on May 17, 2011 at 11:52

Thank you..

Somnath Jagtap

[ This message was edited by: jagtap.somnath on 22-05-2009 11:44 ]