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
500 Van Buren Street
Kemptville, ON K0G 1J0
CANADA
T 613.591.1662 ext. 3336
F 613.258.7418
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
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
As Edward says, if power supply and oscillator are OK, unsecure should work.
Few tips:
http://www.pemicro.com/downloads/download_file.cfm?download_id=301