Hi there,
I'm trying to flash my MC9S12XF512 with a USBDM Debugger. By try and error I found out it would flash when I use the profile of the MC9S12XEP100. It flashes without error, but afterwards the programm won't run. I checked the memory ranges in the hc12_devices.xml with the datasheet and they are matching. Problem is I don't know about the other parameters like pageAddress, registerAddress, tclScriptRef and flashProgramRef.
Could anyone give me a hint what else or where I could find the needed values in my Ref. Manual to get it working?
Thank you,
Marcel
Hi Marcel,
If the programmer successfully programs the device there isn't really much need to change anything. If it verifies correctly I would be pretty confident that the device is programmed correctly.
I have just compared the MC9S12XF512 to the MC9S12XEP100 and they appear very similar. The only difference I could see is that the SDID (partids) are different and the Flash size (reflected in the pages=...) line are different.
An updated entry is shown but it won't really make any different c.f. MC9S12XEP100 except that it should auto-detect correctly and complain if the memory image has too many pages of data.
<device family="HCS12" name="MC9S12XF512 ">
<clock type="External" />
<memory type="ram">
<memoryRange start="0x2000" end="0x3FFF" />
</memory>
<memory pageAddress="0x0017" registerAddress="0x0100" type="eeprom" sectorSize="256" alignment="2">
<memoryRange start="0x0800" end="0x0BFF" pages="32" pageStart="0x00" />
</memory>
<memory pageAddress="0x0015" registerAddress="0x0100" type="flash" securityAddress="0xFF00" sectorSize="1024" alignment="8">
<securityEntryRef ref="HCS12-xep-security" />
<memoryRange start="0x4000" end="0x7FFF" /> <!-- Fixed 0xFD -->
<memoryRange start="0x8000" end="0xBFFF" pageReset="0xFE" pages="512K" pageEnd="0xFF" />
<memoryRange start="0xC000" end="0xFFFF" /> <!-- Fixed 0xFF -->
</memory>
<sdidMask value="0xFFF0" />
<sdid value="0xD480" />
<flashScripts>
<tclScriptRef ref="HCS12-XFTMRK-flash-scripts" />
</flashScripts>
<flashProgramRef ref="HCS12-XMMC-XFTMRK-flash-program" />
</device>
Are you confident that the the program you are trying is OK?
If you want to post the binary I can do some check against a MC9S12XEP100 to see if there is anything I've missed.
bye
Hi pgo,
thank you for the fast help. I tried the settings you gave me above, but I think I already bricked the chip by all the try and error I used a few days ago. Now I can only flash it with Erase Option "EraseMass" and it only works every second time. The first time I try it gives me an error: "Programming of the target flash failed! Reason: Flash command failed (Verify, Erase, Blank check or Program)". Then I took the board to a colleague who initialy flashed it with a Lauterbach debugger, but his debugger won't communicate with the microcontroller any more. Do you have any more ideas? Otherwise I think I need to replace the controller.
Thank you, with best regards
Marcel