MC9RS08KA8 how to write a data to the flash memory while the code is running

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

MC9RS08KA8 how to write a data to the flash memory while the code is running

923 Views
sentenced
Contributor I
My program is running in the setup mode at the beginning and gather some trimpot values. Then save them as settings. When you turn the trimpot, the program goes into run mode. There is no problem here. But after power down the settings disappear. I want the circuit to run with the previous setings. So i must write the values in the flash memory. But i couldnt understand how to write to flash memory. Is it mandatory to apply 12V to Vpp?

I use C and code warrior v6.2.

Can you please help me?
Labels (1)
0 Kudos
1 Reply

201 Views
Ake
Contributor II
Hi,
If you want to program the Flash EPROM of an 9RS08 while the code is running, there are two major obstacles to overcome:
 
1) As the program that programs the Flash EPROM cannot execute in the same area as the Flash EPROM, the code must be moved out to the RAM and executed there.
 
2) The 9RS08 does not have a built in high voltage generator that is used when erasing/programming the Flash EPROMs. So the 12 V Vpp must be generated outside the MCU and connected to the /RESET pin.
 
So I would rather use, eg the 9S08QD device instead of a 9RS08.
 
Regards,
Ake
0 Kudos