Flash used as EEPROM for hardware calibration data.

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

Flash used as EEPROM for hardware calibration data.

3,077 Views
foreigner
Contributor I
Using CW HCS08 special edition on a HCS08AW60 with P&E USB Multilink.
I am trying to store some calibration data that is located in flash from the debugger command line.  I save the data to a s-record using the "save" command, which works.  I then proceed to erase the part and reprogram.  After that I want to use the "srec" command from the command line to program cal data back to flash but it never gets there even though the message on the command line claims to perform the operation successfully.
I put the following command in the "BDM_P&E_Multilink_Cyclone_Pro_Preload.cmd": SAVE 0xF000..0xF7FF CAL_FLASH_DATA.S19.  I put the following command in the "BDM_P&E_Multilink_Cyclone_Pro_Postload.cmd": SREC CAL_FLASH_DATA.S19.
The save works but the srec will not work.  If I then enter "Expert Mode Programmer" from the debugger window (PROGHCS08 programmer), I can store the data from the saved s-record just fine.  The problem is that I want to automate this using the preload and postload command files so it automatically does this for me.
What's the solution?? Why does the "srec" command not work but "save" does??
Labels (1)
0 Kudos
Reply
2 Replies

464 Views
peg
Senior Contributor IV

Hi Foreigner,

Commands like SREC, COPYMEM etc don't seem to know that most of the memory is FLASH and expect it to be RAM. SREC works to RAM areas and COPYMEM will copy a block of RAM or FLASH to RAM only. The commands give no hint of a failure when you try to write to FLASH.

When you use a P&E BDM from CW the FLASH commands from the command line seem to be disabled as they work with the hiwave stuff.

If for instance you use the OSBDM which uses hiwave for flashing now you can use FLASH commands from the command line to acheive what you are trying to do.

This is not expert commentary, but only what I have discovered for myself by experimentation. I think you should post another question in the Codewarrior forum if you want to persue this further.

BR Peg

Message Edited by peg on 04-30-200608:29 PM

0 Kudos
Reply

464 Views
foreigner
Contributor I
Hi BR Peg!
 
Thanks for the info.  I guess reading flash into an s-record is all it may be able to do at this time.  I have asked for some tech support on this and we will see what the explanation may be.  Thanks a lot for your info.  I'll let you know if they have a solution to this.  Right now it's just some extra steps to keep my cal data from being erased while developing and reprogramming the part frequently.
 
Thanks,
Foreigner
0 Kudos
Reply