I'm working with a HCS12 device, more specifically MM912j637 which can be used as a battery monitor.
My environment includes Code warrior 5.1 for HCS12 devices, as well as the HIWAVE debugger. The board is a simple one, nothing special,
just the necessary components according to the Freescale's documentation. I had one board which worked fine until the day before yesterday when all of a sudden
it stopped working. When attempting to debug using HIWAVE I ended up with "Unable to connect to the Target CPU". If I carry on regardless and try to download the image
to the target I get the infamous "Error while loading diagnostics algorithm to target system. The chip may be secured, or the derivative selected may be wrong."
There were a few instances of the above error discussed on the forum and all of them were not answered properly, i.e not resolved.
Nevertheless, I built a new board with a brand new chip and got the same result in HIWAVE, that is - unable to connect...
Trying to eliminate a possible failure of the TBDML interface (Turbo BDM Light GDI v1.7) I used the USBDM programmer. My first device was detected by the programmer with an
ID 3881 and no device name. I modified the hcs12_devices.xml in the USBDM directory to include the new device, simply by creating a new entry similar to the MM912H634 device which is "almost" the same device as MM912j637. That gave me the possibility to try a mass erase, which of course was unsuccessful. The tcl script returned an error, which when digging in the script, appeared to be related to inability to unsecure the device.
Bottom line - I have two devices which do not work at present. One of them just stopped working, the other I can't get it to work either.
Turbo BDM status register returns meaningful HW, SW versions and crystal frequencies. The status registers returns 0xFF which according to some other discussions is not good. I also tried keeping RESET to low when powering up the device and when trying to mass erase but without success. I am not sure whether my BDM is faulty or I should blame my boards.
I don't have another device to test TBDML, but in my opinion it is OK. As for USBDM, I think it works too (lights are programmer appears in the drop-down list.
Therefore, I have reasons to believe I somehow can't unsecure the devices, although I have no explanation how they got locked. I never played with SEC bits and the second MCU was new.
I came across similar topics in the Kinetis discussions with people complaining they can't program new devices and also some other device having stopped working.
Any ideas/clues really appreciated.