How to place Chip into "Special Single Chip Mode" - MC9S12DG128

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

How to place Chip into "Special Single Chip Mode" - MC9S12DG128

Jump to solution
1,520 Views
jonathan_abbati
Contributor III

Hello Friends!

 

I am working with the MC9S12DG128 chip on the Adapt9S12D board and I am having some troubles dealing with a error message which is:

 

"Target Connection Failure

USBDM can't enable BDM made on the target. This may indicate that the device is secured"

 

I am using a USBDMLT to interface the board with the computer as well. Additionally, I have come across a few pieces of information on the internet which states for me to place the chip into "special single chip mode". However, I do not know how to go about doing this. Can anyone please help shed some light on this situation for me, I greatly appreciate your time my friends and  I wish you a most miraculous set of days to come.

Labels (1)
0 Kudos
Reply
1 Solution
1,036 Views
jonathan_abbati
Contributor III

you should be able to unsecure the device by using the stand-alone programmers supplied with USBDM - probably HCS12_FlashProgrammer.exe.  Just load any S19 file you have from a suitable project and select the unsecure radio button. This was sent from "PGO" and it has worked for me so I hope that it works for you!

View solution in original post

0 Kudos
Reply
5 Replies
1,036 Views
kef
Specialist I

Please stop flooding forums with identical messages.

 

Debugger what you want for you. Single chip mode is the first thing debugger normally does. What is USBDMLT? If it is the P&E USB-ML-12 (multilink), then you should download Unsecure12 utility from pemicro.com

0 Kudos
Reply
1,036 Views
jonathan_abbati
Contributor III

I made this new one because I didn't say anything about the "special single chip mode" within the last post. I am sorry it if is coming across in that manor my friend. I have used unsecure_12 and it did not work for me, for some reason it could not communicate with my board through the USB port or serial.  For the few pieces of code I have found online through Motorola and other sources, they have told me to place the chip into "special single chip mode" and I have found within the documentation that I must set the MODC pin to a low but I can not find it to do so. Additionally, he USBDMLT is a USBDM pod for S12 controllers which allow interfacing with codewarrior and noICE IDEs. Would you perhaps have any other ideas as far as this situation is concerned my friend? And thank you so much for taking the time to reply, I greatly appreciate it.

0 Kudos
Reply
1,037 Views
jonathan_abbati
Contributor III

you should be able to unsecure the device by using the stand-alone programmers supplied with USBDM - probably HCS12_FlashProgrammer.exe.  Just load any S19 file you have from a suitable project and select the unsecure radio button. This was sent from "PGO" and it has worked for me so I hope that it works for you!

0 Kudos
Reply
1,036 Views
Sany
Contributor III

Just want to share out something here. I flashed in a corrupted firmware into my 9S12XA256. The firmware itself able to re-flash and reprogram the MCU internal EEPROM and FLASH. This buggy firmware some what make my 9S12XA256 fail to connect to my BDM debugger multilink using hi-wave.exe. But I can noticed from command window that the MCU actually return the registers value. It just that hi-wave.exe can't stopped it. Whenever, 'stop' command issued, it only showed 'stopping' but no 'stopped' message. I gone through all the tools on hi-wave.exe include unsecure command. All just don't worked.

 

So I am suspecting that my MCU was in BDM disabled mode. I digged out the datasheet on BDM how to enable it. This led me to Special Single Chip Mode by default - pull low the MODE C pin. And most importantly also led me to this thread. Thread starter posted almost identical with my problem. I tried pull low MODE C pin - not work also, multilink still not able to connect.

 

This thread enlightened me that I need the BDM debugger tool provider software to do something on the MCU before it can be used with hi-wave.exe again. So, I go back to www.pemicro.com , get their unsecure S12X tool which is free. Run it. Now, my S12X back to normal.

 

Conclusion, my MCU actually was corrupted to secure mode in which hi-wave.exe not able to connect it. And one important note is that the hi-wave.exe unsecure tool seem not working at least for me.

0 Kudos
Reply
1,036 Views
kef
Specialist I

Hiwave unsecure.cmd works when multilink clock divider (IO_DELAY_CNT) is set up properly. Mature projects seem to remember this setting from the last successfull connection attempt. In case of secured chip and new project, this IO_DELAY_CNT may be set wrong and unsecure.cmd won't succeed. Try setting IO_DELAY_CNT by hand using following formula, which was visible in older CW versions and is no more visible in connect dialog in recent CW.

IO_DELAY_CNT = 240 / crystal_clock_MHz - 1

14  for 16MHz crystal, 59 for 4MHz crystal etc.

 

I just did it for secured S12C chip from new experimental project. It didn't connect and unsecure didn't succeed. After setting up IO_DELAY_CNT unsecure.cmd worked and I was able to flash and debug my program.

 

  • Conclusion, my MCU actually was corrupted to secure mode in which hi-wave.exe not able to connect it. And one important note is that the hi-wave.exe unsecure tool seem not working at least for me.

:smileyhappy:. Secure mode is not corrupt but very useful mode.

0 Kudos
Reply