MS9S08GT16A:ERASE and WRITE to FLASH. Problem with FCMD writing.

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

MS9S08GT16A:ERASE and WRITE to FLASH. Problem with FCMD writing.

843 Views
sm
Contributor I
Hello everybody,

I search to  implement an Eeeprom emulator with the flash of à MC9S08GT16A.

I have an illegal BP: I think the reason of it is I can not write the command of erase and writing commands in FCMD.

Which are the conditions and/or the manners to write in this register?

I thank you.


Labels (1)
0 Kudos
1 Reply

266 Views
Ake
Contributor II
Hello,
I have not got too much experience with the 9S08GT16A, but perhaps I can help a little bit.
First of all, to be able to erase or program the Flash EPROM in the 9S08 MCUs, the address and data busses that are connected to the Flash EPROM must be stable. This means that you cannot use the Flash EPROM for executing the program so it must be moved outside. This is mostly done  in RAM. Some of the latest 9S08 have EEPROMs that are separate from the Flash EPROMs and are therefore very nice for storing erase/programming routines.
The 9S08GT16A does not have any special EEPROM, so the RAM must be used.
When using the RAM two kinds of approach can be used. Either a buffer can be assigned where the program/data can be  stored, or the buffers can be stored on the stack.
The simplest way is to store it in the RAM buffers, the more elegant is to use the stack instead.
 
As I have no 9S08GT16A code, the only thing I could offer is some 9S08QG8 software, which I believe is quite similare. And I cannot guarantee that the program is free from bugs ofcourse.
 
Regards,
Ake
 
Message Edited by t.dowe on 2009-10-27 01:15 PM
0 Kudos