The preliminaries:
I have 5.7.0 CW IDE for HCS12, processor = MCS12A256BCPV, P&E Micro USB multilink interface - USB-PE5012998
The symptoms:
I just enabled the software watchdog and was attempting to reprogram the device when low and behold I am stuck in a loop and the programer / debuger is unable to stop the device long enough to get the new program loaded.
Is there a trick to get the processor to completely halt under these circumstances?
Is there an optimal USB interface communication setting that would help me out?
Is there a method to reprogram it so some other code can run?
How do you set the watchdog to start latter in the code instead of in the during generated auto initialization?
I think thats enough questions for now.
Thanks in advance.
I managed to get the system to stop by somehow writing to the chip options 0x100 onward but now the system is definitely "secured"
Everytime I "unsecure" it with the PEMICRO interface it says "unsecured successfully" but when I go to program I get ...
0 EEPROM 400 - FFF Blank - Unselected
1 FLASH_4000 4000 - 7FFF Blank - Unselected
2 FLASH_C000 C000 - FFFF Programmed - Unselected
3 ALL_PPAGES 308000 -3FBFFF Programmed - UnselectedFP: The UNPROTECT command is not available for the EEPROM flash module => Skipped.
FP: The UNPROTECT command is not available for the FLASH_4000 flash module => Skipped.
FP: The UNPROTECT command is not available for the FLASH_C000 flash module => Skipped.
FP: The UNPROTECT command is not available for the ALL_PPAGES flash module => Skipped.
FP: The UNPROTECT command is not available for the FLAT8000_P30 flash module => Skipped.
FP: FLASH_C000 flash module is bad or protected.
FP: ALL_PPAGES flash module is bad or protected.
FP: FLASH_C000 flash module is bad or protected.
FP: FLASH_C000 flash module is bad or protected.
My current settings are : Operating mode = special single chip
target operation mode = special single chip
I think MODA and MODB pins are set to low
I tried PEMICRO unsecure_12 command line software but it reports :First I was getting:
Interface Cable Detected
Searching for Interface Speed
ERROR - Communicating with target.
Appropriate interface speed not found.
Then I got:
Interface Speed Determined
Initial Flash Security Register, FSEC = $FE
WHAT? - Device is Already Unsecured.
I am at a loss and really regret initiating the software watchdog - I have had no peace since that point.
Yes, I tried a blank load on the chip with the same results. I also programmed some other boards and they work fine.
I am looking for a way to unsecure / blank erase the whole chip so I can get my new program on it.
Hello
I assume you are using a multilink cable for debugging. Am I right?
I would recommend you to check P&E Web site.
As far as I remember they have a utility available to unsecure HC12 chips.
CrasyCat
Thanks CrasyCat,
I have tried their program (unsecure12) and it said that it is unsecured but it still fails to program the two higher level memory blocks. Most likely because they are still accidentally "secured" with some randomn key.
I have posted a service request with P&E and we went as far as we could with it without getting anywhere.
Found the problem to be hardware related. Chip was getting reset by external watchdog as the debugger disturbed the timing. disabled the external reset when a PLD detects a debugger is present.
Short answer, was hardware not software.