HI!
I would like to ask for help as i'm a bit desperated. I will try to be as clear and short as possible.
My task is to upgrade a 9S12D64 with a newer version of software (no matter about what). My first idea was to read the unit (to have a backup), and I did it without problems with the memory dump utility, reading from 0x0000 to 0xFFFF (in reality I read from 0x4000 as the first part is RAM area). It generates a good loking S19 file, but I looking inside the file, it's strange to find that the adress from 0x4000 up to 0x5000 was empty (0xFF)... it sound like a mistake in the read procedure from my side.. perhaps i did something wrong... can someone tell me if I get a correct (and complete) dump?
After get different readings, believing that I had a backup of it, I tried to write back the same data (from the .s19 file)... I didn't success, and soon I get realized that the HCS12 must be erased, so I did it.
Finally it started to write data on the device, but at the 2/3 of the process it stops and launch an error because the memory was not empty. After some time, I get realized that:
So as it seems it's a remap problem, I dig into the HCS12 programmer, and in found where the device is defined (hcs12_devices.xml), and I changed this line:
<memoryRange start="0x8000" end="0xBFFF" pageReset="0x3E" pages="64K" pageEnd="0x3F" />
for this other:
<memoryRange start="0x8000" end="0xBFFF" />
And now, I can write the device without error... but I guess this is a big mistake, and the definition of the device was Ok, and i'm a stupid.
Finally.. i tried to write the device with a new firmware that was readed by x-prog hardware, and I have two files. One for the flash (from 0x0000 to 0xFFFF, 64k), and another for the eeprom (just 1K). I wrote the flash part (without problems but with the modification in the hc12_devices.xml file), but no idea how can I write the Eeprom file.
Obviusly, right now I have a device that makes nothing... not sure if it's because the eeprom was not written, or because the way to program it was not correct (probably both)
Probably this is a very basic and noob problem but I thank you very much if you can help me, explaining me what i'm doing wrong, or the correct procedure to do it.
Thanks in advance for your time and attention.
Regards
Solved! Go to Solution.
Hi Potros,
The simple answer is that the Memory dump program doesn't support paged addresses.
I have rectified this in the current version just uploaded.
I have confirmed operation with a MC9S12A64 chip which is similar to the one you are using.
bye
Dear Pgo,
I am working with MC9S08AC128 and MC09S12Q128 MCUs, but can not correctly read the memory with Memory Dump. I see You place the exaple for MC9S12A64ALT. Can You place and examples for MC9S08AC128 and MC09S12Q128 for paged memory reading?
Hi PGO
Sorry for my late answer.
I have checked it and it works well right now :smileyhappy:
I have some doubts about specific regions, but its a matter of play and understand correctly how the uC works
Thank you very much for your help and time.
Kind regards.
Hi Potros,
It has been quite a while since I have looked as 9S12 devices so I may be a bit foggy.
According to the memory map in the manual (p27) the D64 supports paging with 64K flash with the last page being 0x3F so I think the original entry was correct.
To read the original chip it is necessary to use paged addresses (I believe from memory!).
Possible reasons for error on programming:
Please do the following:
bye
Thank you very much PGO for such quick answer.
Looking at the memory map of the uC, the region paged is just between 0x8000 and 0xBFFF, that in this particular case, have 4 pages. The first 0x0000 to 0x4000 are irrelevant.. right?
You can download the following file, where i have inlcuded the dump that I got (version 3.5), and the dump from X-Prog (version 4.5):
I'm looking for the debug version of the programmer (I don't find it), and also trying to program it with codewarrior suite that it's my first contact with this enviroment, so its a bit difficult.
I will update you asap with any sucess.
Again... thanks for your time.. :smileyhappy:
Regards.
Hi Again
Finally I program it correctly with the codewarrior debugger.
After this , i tried to work with the USBDM tools, and I have found that the "USBDM Memory Dump" don't work correctly.
This means that:
If I try to read those four segments with the dump tool, I just get the same segment (the first one, so starting with 0x3C8000) copied 4 times.
I didn't try to write. I think is better to have a correct dump.
I hope this can help you PGO. Let me know how can I help you. I didn't find any "debug" version of your suite.
Kind regards.
Hi Potros,
The simple answer is that the Memory dump program doesn't support paged addresses.
I have rectified this in the current version just uploaded.
I have confirmed operation with a MC9S12A64 chip which is similar to the one you are using.
bye
Hi pgo,
Could you tell me about "Initialzation"?
Is it write 0x11 to 0x12(adress of memory)?
Thanks
Boone
Dear Pgo,
I am working with MC9S08AC128 and MC09S12Q128 MCUs, but can not correctly read the memory with Memory Dump. I see You place the exaple for MC9S12A64ALT. Can You place and examples for MC9S08AC128 and MC09S12Q128 for paged memory reading?