Writing to flash Memory

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

Writing to flash Memory

4,183件の閲覧回数
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,639件の閲覧回数
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,639件の閲覧回数
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,639件の閲覧回数
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,639件の閲覧回数
BobMac
Contributor I
PS, I don't know where the smilley facey thingy came from.

Bob
0 件の賞賛
返信