Can't reprogram HC12X chip

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't reprogram HC12X chip

1,409 Views
sbelanger
Contributor I

Hi,

While working on an HC12XDP512 using CW 4.6, I've noticed that my controller can't be reprogrammed anymore. I've been debugging for a little while using HighWave and at some point, I've seen the following errors occurring :

 FP: FLASH_4000 flash module is bad or protected.
<Timeout> (> 5000 ms)
Program counter: 0x0000F5D2
Executing .\cmd\P&E_Multilink_CyclonePro_vppoff.cmd

When the chip is being burned, sometimes I can see a message like the following:

Error: Can't write EE00..FF00

If I use the Unsecure12 program:

Interface Cable Detected
Searching for Interface Speed .
Interface Speed Determined
Inital Flash Securituy Register, FSEC = $FE
WHAT? - Device is Already Unsecured

I'm currently using the P&E USB HC8/HC12 Multilink device to program my board.

Please note that no changes were done on the mapping. This is plain "compile -> link -> program -> debug" operations I've been doing. The device is unsecured but can't accept a new firmware. I've been able to reproduce this issue on different boards and they show this behaviour after a while.

Does anybody know a quick workaround for this issue? What might be the root cause of this problem?

If you need further details, please let me know.

Thanks

Labels (1)
0 Kudos
Reply
1 Reply

587 Views
sbelanger
Contributor I
I've finally found it!
 
The issue was caused by 2 factors:
 
1- The device had a mapping for EEPROM and Flash different from the new firmware to be uploaded.
2- The BDM wasn't in full control of the reset line due to an external watchdog circuit.
 
So the final solution was :
 
1- Disable the external watchdog.
2- Mass erase the HC12X chip.
3- Reprogram.
 
I hope this might help someone
0 Kudos
Reply