Writing to flash Memory

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Writing to flash Memory

4,171 次查看
BobMac
Contributor I
Good Day All!
While reading all about writing stuff to the flash in our 908JL16, I came accross this little head scratcher;
Reference the Freescale Data Sheet MC68HC908JL16.
Page 37 "Algo for Programming a Row of Flash"

Block 3 "write any data to any flash address" What the heck does this mean???
Why write data to any flash address and at this point too.

The Algo continues to the flash burn loop where in the byte to be programmed is written
and then exits.

Confused in Cal. Bob
标签 (1)
0 项奖励
回复
4 回复数

1,627 次查看
rocco
Senior Contributor II
Hi, Bob:

It's a hardware thing.

The important part of this is that this write is the first access to the flash memory since setting the PGM bit. The address that you write to has to be in the row of flash that you are programming (note the next line in that block). This write latches the address of the row into a hardware register that allows that row to receive the programming voltage that you will enable in block 5.

At least that's how it was explained to me for the GP32.
0 项奖励
回复

1,627 次查看
BobMac
Contributor I
Thanks ROCCO!
You know, in the light of day I don't really know why I asked this question. I realize now that the action in question is INSIDE the rom routine "prgrnge" and not something that I would have to contend with. I appreciate your responce none the less.
Now that I have cornered you, another question leaps to mind, if you please. Do we have to erase (call "errange") a page before it can be programmed?
All we want to do is store some variablles to flash now and again to use them the next time the processor is powered up. As we used to do in external SEEPROM in the "olden days".
Regards, Bob
0 项奖励
回复

1,627 次查看
bigmac
Specialist III
Hello Bob,
 
The first time your parameters are programmed, the flash will already be erased, so you do not need to erase.  However, if you need to re-program the existing parameters, the flash block you are using will first need to be erased.
 
The flash block(s) used for parameter storage should commence at the first flash block for the device.  This allows write protection of the program code to be implemented.
 
Application note AN2874 may be of interest - since the JL8 is an "Instance B" device, I might assume would also apply to the JL16.
 
Regards,
Mac
 
Message Edited by t.dowe on 2009-09-16 10:20 AM
0 项奖励
回复

1,627 次查看
BobMac
Contributor I
PS, I don't know where the smilley facey thingy came from.

Bob
0 项奖励
回复