Flash function - QE 8 micro

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Flash function - QE 8 micro

2,574件の閲覧回数
JulsPower
Contributor II
Hi
Im working with the QE8 micro
I would like to do some read write operation in non volatile memory
but I wasn't able to find any C example for HCS08 about flash.

Someone know where I could find this?

thanks

ps I tried the search function



Message Edited by JulsPower on 2008-12-10 05:37 PM

 

Added p/n to subject.



Message Edited by NLFSJ on 2008-12-17 07:49 AM
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,004件の閲覧回数
JulsPower
Contributor II
Great thanks
this seem to bewhat i was looking for
0 件の賞賛
返信

1,004件の閲覧回数
Ake
Contributor II
Hi,
I have an example how to use the Flash EPROM in a 9S08QE8 as an EEPROM.
It reads/writes data at 0xF800. If you want to use the protection of your program memory, this should be moved downto 0xE000.
The files are compressed with WinZip, so unzip it before you can try it.
 
I am including a technical paper describing how the Flash EPROM routines work.
 
Regards,
Ake
 
Message Edited by t.dowe on 2009-10-27 11:59 AM
0 件の賞賛
返信

1,004件の閲覧回数
jerryn
Contributor I
Regarding the relocation of the flash code to ram.....is this necessary only if you need to erase the entire flash, or can the flash functions be run out of flash in the normal fashion?
 
Also, I tried using the S08_flash functions, while connected with a debugger, but do not see the memory change. 
 
I used the initializer to set the FCDIV register, and I verified that 0x42 was sent, and that after reset the register reads 0xC2, as expected, so I did not call the FlashInit() function.
 
I ran the following, then checked the memory location with the debugger, but it is still 0cFF
if(Flash_Erase(0xFE00))
{
   i=9;
}
ucInput = 0x5A;
if(Flash_Program(0xFE00,ucInput))
{
   i=9;
}
 
Is there something else that I need to do to get the flash to be programmed?
 
Thanks,
Jerry
0 件の賞賛
返信

1,004件の閲覧回数
jerryn
Contributor I
I tested the code after doing the relocation thing, and running the Flash_Functions out of ram, without success....get an "illegal breakpoint" in the debugger cmd screen.
 
Prior to running out of RAM, I would see that the memory around 0x80 would get zeroed out after calling the flash function just to write a single byte.
 
A couple of times, a couple of bytes were successfully programmed, but success was not repeatable with an erase, then a program.
 
Jerry
0 件の賞賛
返信

1,004件の閲覧回数
roja
Contributor I

Hi Jerry

how did you solve the problem you have posted at the end ie., the program control going to some location 80

 

 

roja

0 件の賞賛
返信