MC9S12E128 - Cannot Unsecure

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

MC9S12E128 - Cannot Unsecure

1,559 Views
almcneil
Contributor II

I am getting an error when I try to download & debug a target using the MC9S12E128. As best as I can determine, it's because I cannot unsecure the MC9S12E128.

 

Here is my setup. Target is a an in-house board using a MC9S12E128. Host is a Windows XP SP3 workstation. Using a Cyclone Pro ICD via USB cable from host and 6-pin BDM connector from ICD to target. I am using CodeWarrior CW12_v3.1. When I go to download my build, the debugger eventually times out and issues the errors as follows:

   

     Hi-WAVE Failed to find communication speed!


     Hi-WAVE Communicationto the target has failed

     (target MCU has no clock or wrong BDM clock speed is used

     or derivative is secured!)

 

     There is currently no Target connected.

     Please, connect a Target before loading an executable file.


BTW, I'm new to my position. I am an experienced embedded systems developer, just new to Freescale.


I did some searching and reading and believe that the problem is the debugger is not connecting to the MCU and then unsecuring it. I've tried changing settings via the debugger interface (True-Time) but can't get it to work. I then found the P&E Micro Unsecure 12 but can't get it to work either. I get the following error:


ERROR - Communicating with target.

Appropriate interface speed not found.


I have tried different speeds but nothing works. I still believe it's a clock/speed setting just don't know what it is.

 

Any answers or suggestions?

 

Andy McNeil | Systems Engineer

Spotwave Wireless Inc.

Kavveri Telecom Products Limited

  1. P.O. Box 550

500 Van Buren Street

Kemptville, ON K0G 1J0

CANADA

T 613.591.1662 ext. 3336

F 613.258.7418

E andy.mcneil@kaveritelecoms.com

Labels (1)
0 Kudos
Reply
3 Replies

836 Views
almcneil
Contributor II

Actually, I solved this an hour after I posted asking for help. It was not far off what Radek & Edward suggested above. I started to swap CyclonePro ICD units and the 3rd one worked! I had been working all night and once I knew I had the debugger working I went home to bed. I am new to my job and the last person did not leave the work in an manner that's easy for me to pick up. Meanwhile, my manager was complaining that it's taking along time so I worked non-stop until I did then went home to crash in bed!

I want to investigate why 2 ICD units fail while I 3rd one works. It's unlikely to have 2 bad units especially when one was left by the last engineering who was successfully using it. There might be more to this.

-- Andy

0 Kudos
Reply

836 Views
kef2
Senior Contributor V

Andy,

are you sure your in-house board is designed properly? You should make sure at least that 1) internal voltage regulator outputs are not shorted to VCC, but only decoupled with caps, 2) test pin is low, 3) VREGCTL high, etc. If those are good, pull BKGD low and power the board while BKGD=0. ECLK pins should start oscilating with bus frequency= osc clock /2. If it is so, then S12E should be OK, peraphs something wrong is with BDM<->USB part.

I'm not familiar wwith Cyclone, but Multilink with CW debugger for some reason don't use BDM SYNC command for target clock detection. Instead they rely on reading some patterns from MCU address space at different BDM clocks, or something like that. And this non-SYNC detection always fails on secured parts. You should use P&E Unsecure 12 instead. You need to verify that ECLK freq * 2 matches what you specify in Unsecure 12 utility. I mean here, that ECLK may operate in self clock mode, with ECLK freq not coupled with your crystal clock. If indeed ECLK is also OK, not self clock mode but crystal freq /2, theen peraphs your Cyclone got damaged.

Regards

0 Kudos
Reply

836 Views
RadekS
NXP Employee
NXP Employee

As Edward says, if power supply and oscillator are OK, unsecure should work.

Few tips:

  1. Please check also your BDM cable, it could broken or wrongly connected (check mainly orientation of BDM connector, on both sides). I would like to note that BDM cable lenght is limited. It depends on communication speed and type of cable, but we can say that 1~2m is maximum lenght for ribbon cable.
  2. Please diconnect all other BDM interfaces from your PC (just for sure, if you use something other than CyclonePro)
  3. Please check your USB port by any other USB device like mouse, flash disk....
  4. Please try reinstall P&E Hardware Interface Drivers

http://www.pemicro.com/downloads/download_file.cfm?download_id=301 

  1. If it is possible, please check power consumption of your board (due to some short-circuits).
  2. Do you have any capacitor connected to BKGD pin?
  3. Could you test Cyclonepro with different board/PC? 
0 Kudos
Reply