Stack for flash programming

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stack for flash programming

410 Views
vishaka_maithil
Contributor I

Dear freinds,

 

why do we need Do_on_Stack.asm routines for programming flash memory of any controller? what is its importance.. Can anyone please explain me in detail??

Labels (1)
0 Kudos
1 Reply

293 Views
J2MEJediMaster
Specialist I

For many processors with built-in flash, you cannot be executing code from the same flash memory that you are trying to write to. To work around this problem, the usual procedure is to copy the routines used to do the write-to-flash from flash memory into RAM, and then execute them in RAM while writing to flash memory. The routines you mentioned are designed to perform the copy of the write-to-flash routines into RAM (in this case, the stack).

 

I hope this helps clear things up.

 

---Tom

0 Kudos