How can I record and read a value in the MC68HC908JL3CDW ROM when the resident routines do not work?

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

How can I record and read a value in the MC68HC908JL3CDW ROM when the resident routines do not work?

971件の閲覧回数
luissilva
Contributor I

I have a program in C and inside the routine "Void Main" I need to write and then read a value in ROM, then I update this value to save again in ROM. This value can not be lost in case of power failure. Resident routines did not work. Does anyone have any routine about this? Thank you.

0 件の賞賛
返信
1 返信

862件の閲覧回数
mfugere
Contributor III

Have you looked at this application note?   It is mostly concerned with using the ROM monitor resident routines.  But, the information has some application to requirements if you are to be writing your own code.   As you may know, one cannot be executing code out of the flash program space at the same time as any erase or program operation is ongoing to the flash program address space.   So, you must write a routine to perform the erase operation or the program operation in your code, copy that routine to unused RAM space, and jump execution to that routine.   After it has finished you can go back to your flash code.  You must take care to not erase your own code from flash!

http://www.nxp.com/assets/documents/data/en/application-notes/AN1831.pdf

0 件の賞賛
返信