Hi there,
I'm trying to make a dump of the full flash memory of the MC9S08AC96 chip,
which has a 96K FLASH memory.
But I'm a bit confused by the memory map in the specifications (see attached picture).
I found that in the specifications it is stated PPAGE = 78, so I have to set it to 'paged memory' when reading. Then I can succesfully read PPAGE=0, PPAGE=1, PPAGE=2, PPAGE=3, see attached picture.
But I'm still not at 96K... Still missing is PPAGE=4 and PPAGE=5.
Where are they hiding? If I set the address to 10000 - 13FFF and 14000 - 17FFF I get an error.
Does anyone know how I can dump the full 96K flash?
Thanks!
Solved! Go to Solution.
Hi,
The failure for the verify of MC9S08AC96_AllPages_byAno is really a bug in the programmer. It is confused by the security area being in the main memory map and also appearing in a memory page. I believe it will verify if you select Unsecure option.
An improved memory map is attached MC9S08AC96_ModifiedMap.cfg. This is paged apart from PAGE3 (which contains security information) which is directly accessed. This captures all the Flash without any security issues. I suggest you use this configuration to backup the chip and verify using the programmer.
The good news is that the PAGE0 does contain information that is not visible in the reset memory map. This page (or at least the lower portion) must be used in the paged area. This may account for the failure.
bye
Thanks for your guidance, so that't how I should dump the entire flash.
I'm gonna try it and see if it works.
Updating the software from 4.12.1.262 to the latest version 4.12.1.330 did not go so well...
The USBDM Memory Dump tool works fine (as before), but when I run the HCS08 Programmer tool now, I get an error... (see attached screenshot).
Maybe my mistake was that I installed the new version alongside the old version (without uninstalling the old version first)?
I now uninstalled both versions, uninstalled the drivers, rebooted, installed the drivers, install the new version again, rebooted. But I still can't run the programmer, I still get this error
Anybody knows how to fix this? I hope so.
I found out why I got this connection error.
After upgrading the program, for some reason all time settings were set to "0 ms". After restoring the 'normal values' the program works well again:
Today I did some testing.
The machine I'm working on has two pcb's, a 'power pcb' and a 'control unit pcb'. Both pcb's contain this MC9S08AC96 chip.
I started making a dump of the power pcb chip using the "Memory dump" tool, with the settings as described by @pgo (I attached a screen dump of my - updated - program), followed by a verification of the dump using the "Programmer" tool. The pcb has a connector to access the chip. That went well.
(The updated program is quite convenient, as you now can save and load settings
Then I desoldered the original chip from the power pcb and soldered an a brand new MC9S08AC96 that I bought at mouser.com. I flashed the new chip with the dump using the "Programmer" tool, followed by a verification. That also went well.
Unfortunately, the machine doesn't work well with the new chip
Ok, maybe I have a 'bad chip'? Who knows... So I repeated the procedure with yet another brand new chip. But again the machine will not function correctly.
Then I soldered in the original chip again: the machine works well again!
Am I still missing part of the flash memory with the settings that were posted here?
Or does the chip e.g. have a hardware ID that can be read out by the control unit? So that it detects that I replaced the chip?
I hope someone can shine a light on this, thanks!
Hi,
A bit difficult to diagnose from a distance.
You have done the right thing in using the programmer to verify that the memory image is consistent with the contents of the chip. This is limited however, in that it only checks what is present in the image against the chip - anything missing will not be detected. It is unlikely this would be a problem since I believe the map used is complete (but see below).
I do not know of any ID feature or similar in the AC96 but I am not an expert on this chip.
Some possibilities (rather unlikely)
I suggest you do the following:
bye
Thanks for your swift reply.
Yes, I always use the "Image" option when flashing (see attached printscreen).
The MemoryDumpSettings files that you sent me appear to be dumps (.sx files).
I was expecting a .cfg file that I could load into the MemoryDump program.
But how can I use these to .sx files to create the two images that you request?
Thanks!
Hi,
The failure for the verify of MC9S08AC96_AllPages_byAno is really a bug in the programmer. It is confused by the security area being in the main memory map and also appearing in a memory page. I believe it will verify if you select Unsecure option.
An improved memory map is attached MC9S08AC96_ModifiedMap.cfg. This is paged apart from PAGE3 (which contains security information) which is directly accessed. This captures all the Flash without any security issues. I suggest you use this configuration to backup the chip and verify using the programmer.
The good news is that the PAGE0 does contain information that is not visible in the reset memory map. This page (or at least the lower portion) must be used in the paged area. This may account for the failure.
bye
Thanks again for your help!
Ok, if I understand correctly you suggest to flash the chip with the dump I get from using the MC9S08AC96_ModifiedMap.cfg then.
I made the dump and flashed it with the "Image" option selected under "Security", flashing and verification was successful.
Then I put the pcb in the machine and......
YES YES !!
The machine is working properly now!
So apparently this was the correct way of dumping all flash memory.
I had no idea it could be so complex. Normally it's just looking up the memory ranges in the Reference Manual and using these ranges for dumping the flash memory. But with this paged memory apparently things are not so straight forward anymore!
Thanks a lot for your assistance!
So this is the correct way to make the dump:
The Memory dump program expects paged addresses for the paged area.
This consists of the pageNo+address within window as shown below:
I also suggest you update to the current version of the software as the screen grab you provided appears an old version.
bye