Stack for flash programming

Showing results for 
Search instead for 
Did you mean: 

Stack for flash programming

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

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.



0 Kudos