Can I run a FLASH write routine from FLASH?

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

Can I run a FLASH write routine from FLASH?

1,248 Views
pederalm
Contributor II
Can I erase a part of flash with a program in FLASH? Or do I have to erase flash from a RAMprogram?
 
This is what I like to do:
 
I use the MC9S12XDP512 with 512k flash. I want to store data at page $E8-$EF (block 2, 128k). All other FLASH is for program code. Sometimes I would like to change the data located in block 2. Is it possible to do that with a FLASH routine executing from FLASH or do I have to change the data from a RAM routine? My idea is to have the FLASH routines in the unpaged FLASH area.
Labels (1)
0 Kudos
1 Reply

452 Views
Steve
NXP Employee
NXP Employee
Yes, you can erase & program one flash block while running in another. You cannot erase or program the flash block in which you are running.
0 Kudos