Write mc9s08dz32 eeprom?

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

Write mc9s08dz32 eeprom?

Jump to solution
2,087 Views
jimmygw
Contributor II

I have a MC9S08DZ32 that I need to write the eeprom data to (add. 0x1600 - 0x17FF)... I can write to the flash (0x7C00 - 0xFFFF) with a USBDMLT and flash programmer. What equipment / software to I need to write eeprom data? Thanks.

0 Kudos
Reply
1 Solution
2,010 Views
jimmygw
Contributor II

I post this as SOLVED. Although I do not know what happened. I continued to do what I had been doing many-a-time (reading, writing - or at least trying to - unplugging and plugging the USBDMLT). It suddenly started working. will it stay that way? who knows. but for the time being I got it going. insanity right? Thanks for all the help.

View solution in original post

0 Kudos
Reply
4 Replies
2,069 Views
pgo
Senior Contributor V

Hi,

The standard USBDM programmer supports programming the EEPROM.

Is this not working? (I haven't tested this lately!)

bye

0 Kudos
Reply
2,049 Views
jimmygw
Contributor II

Thanks for your response. I can program the FLASH memory (addr.0x7C00 - 0xFFFF) with "Flash Programmer" . That works fine. If I try to program the EEPROM memory (addr. 0x1600 - 0x17FF) with "Flash Programmer" I get an error saying "Program data not within flash memory". OK, that makes sense as it's called "Flash Programmer". Is there software that will allow me to program the EEPROM memory locations? I have downloaded the evaluation version of Codewarrior, but cannot get it to recognize the USBDMLT hardware.
BDM firmware ver 4,12,1
DLL ver 4.12.1.305
CW for MCU v10.7
thanks jimmy

0 Kudos
Reply
2,025 Views
pgo
Senior Contributor V

Hi,

As stated above - the USBDM Flash programmer does support programming of EEPROM.  The name is merely historical.

The error you are getting is because it is not recognising a range in the memory image being programmed as belonging to the target memory map.

The most likely reasons for this is that the EEPROM paging assumed by the programmer does not agree with that used to create the image or the memory format is unexpected.  Memory formats for HCS08 are somewhat arbitrary, or at least, I was not able to obtain definitive information.

The programmer assumes a paged memory with pages 0 & 1 for the EEPROM which it maps to the EPGSEL bit in the FCNFG register (values 0x11 & 0x51 respectively).

How are the EEPROM contents indicated in the memory map?  I assume this would be  Motorola SREC format?  For the expected format there would be page contents for addresses start="0x001600" end="0x0017FF" and start="0x011600" end="0x0117FF".  This can be changed in the hcs08_devices.xml file.  Search for MC9S08DZ32 and look at the lines similar to:

<memory pageAddress="0x1823" registerAddress="0x1820" type="eeprom" sectorSize="8">
<memoryRange start="0x001600" end="0x0017FF" pageNo="0x11" />
<memoryRange start="0x011600" end="0x0117FF" pageNo="0x51" />
</memory>

I do not have a DZ32 to test with.  I have tested the code (today) with a DZ128  which is similar.

If you want further discussion please provide an example memory image so that I can check the format.

bye

 

0 Kudos
Reply
2,011 Views
jimmygw
Contributor II

I post this as SOLVED. Although I do not know what happened. I continued to do what I had been doing many-a-time (reading, writing - or at least trying to - unplugging and plugging the USBDMLT). It suddenly started working. will it stay that way? who knows. but for the time being I got it going. insanity right? Thanks for all the help.

0 Kudos
Reply