EmbeddedRelated.com
Forums

BDM Not Working

Started by pickleza April 5, 2005

Hi all.

I am having a huge problem communicating with my board. It did used to
work, but now CodeWarrior tells me that there is no target attached. It
gives a "No target connected, or BDM speed problem", and it won't auto
detect the clock divisor. It did work until fairly recently.

I know that my P&E Multilink cable is fine because I can still use it
with the developement board that I have, and it works perfectly.

I think it might be that I've somehow blown the BKGD pin. How easy is
it to do? Is it likely?

Thanks
Nicholas




Hi Nicholas.

If you mean that you can debug the same board with the P&E Multilink cable
+ another software than CodeWarrior, it is probably not a BKGD pin issue,
but rather a software issue.

You can send me software info and cable details off line directly to my
address. Then I will try to help.

Also,

The debugger is instrumented with low level protocoling display, reporting
function calls to hardware DLL drivers.
I wonder if you can follow the steps here below to help me sort out this issue.

1-To enable this, please first open in the debugger a Command window/component.

2-In this Command window, type "PROTOCOL ON" then Enter key at the "in>"
prompt.

3-Press the Save debugger button to save this setup.

4-Close the debugger then restart.

5-Start the debugger again. After the connection attempt passed or failed,
please scroll and select with the mouse all what got reported in the
Command window.

6-Copy (Ctrl+C) this then send it to me. Regards,
Gilles At 01:27 PM 4/5/2005, you wrote: >Hi all.
>
>I am having a huge problem communicating with my board. It did used to
>work, but now CodeWarrior tells me that there is no target attached. It
>gives a "No target connected, or BDM speed problem", and it won't auto
>detect the clock divisor. It did work until fairly recently.
>
>I know that my P&E Multilink cable is fine because I can still use it
>with the developement board that I have, and it works perfectly.
>
>I think it might be that I've somehow blown the BKGD pin. How easy is
>it to do? Is it likely?
>
>Thanks
>Nicholas >
>Yahoo! Groups Links





Hi Nicholas:

Another possibility is that the HCS12 part that you're using got
secured and the BDM box cannot talk to it anymore. You can try the
unsecure12 program that P&E offers in its website. This program allows
to 'unsecure' secured parts.

Try it and let us know!

Regards,

Alex. --- In 68HC12@68HC..., Gilles Blanquin <gilles.blanquin@f...>
wrote:
>
> Hi Nicholas.
>
> If you mean that you can debug the same board with the P&E Multilink
cable
> + another software than CodeWarrior, it is probably not a BKGD pin
issue,
> but rather a software issue.
>
> You can send me software info and cable details off line directly to my
> address. Then I will try to help.
>
> Also,
>
> The debugger is instrumented with low level protocoling display,
reporting
> function calls to hardware DLL drivers.
> I wonder if you can follow the steps here below to help me sort out
this issue.
>
> 1-To enable this, please first open in the debugger a Command
window/component.
>
> 2-In this Command window, type "PROTOCOL ON" then Enter key at the "in>"
> prompt.
>
> 3-Press the Save debugger button to save this setup.
>
> 4-Close the debugger then restart.
>
> 5-Start the debugger again. After the connection attempt passed or
failed,
> please scroll and select with the mouse all what got reported in the
> Command window.
>
> 6-Copy (Ctrl+C) this then send it to me. > Regards,
> Gilles > At 01:27 PM 4/5/2005, you wrote: > >Hi all.
> >
> >I am having a huge problem communicating with my board. It did used to
> >work, but now CodeWarrior tells me that there is no target attached. It
> >gives a "No target connected, or BDM speed problem", and it won't auto
> >detect the clock divisor. It did work until fairly recently.
> >
> >I know that my P&E Multilink cable is fine because I can still use it
> >with the developement board that I have, and it works perfectly.
> >
> >I think it might be that I've somehow blown the BKGD pin. How easy is
> >it to do? Is it likely?
> >
> >Thanks
> >Nicholas
> >
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >




Thanks for the replies.

I haven't been able to debug using other software, as I don't have
any other software to try. This may be the answer though. I tried
using the P&E Unsecure program, and there was no comms either.

I get the following from Unsecure 12:

Interface Cable Detected.
Searching For Interface Speed..................
ERROR - Communicating With Target.
Appropriate Interface Speed Not Found.

When I launch the CodeWarrior Debugger, this is what I get:

!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE Data:2 Procedure Data:1 Source Register Assembly Memory
Command
done C_layout.hwl

Loading Target ...
SETCOMM DRIVER NOPROTOCOL NOPERIODICAL ""
SETCOMM COMPORT NONE
Initializing STARTUP command file:
CMDFILE STARTUP ON ".\cmd\p&e_icd_startup.cmd"
Initializing RESET command file:
CMDFILE RESET ON ".\cmd\p&e_icd_reset.cmd"
Initializing PRELOAD command file:
CMDFILE PRELOAD ON ".\cmd\p&e_icd_preload.cmd"
Initializing POSTLOAD command file:
CMDFILE POSTLOAD ON ".\cmd\p&e_icd_postload.cmd"
Initializing VPPON command file:
CMDFILE VPPON ON ".\cmd\p&e_icd_vppon.cmd"
Initializing VPPOFF command file:
CMDFILE VPPOFF ON ".\cmd\p&e_icd_vppoff.cmd"
Initializing UNSECURE command file:
CMDFILE UNSECURE ON ".\cmd\P&E_ICD_erase_unsecure_hcs12.cmd"
close_port()
parallel: open_port(1);
force_background_mode() => 0
write_control()
reset_cable()
check_cable_error() => 0

----------------------------
The "Set Communication Speed" dialog box popped up, and I
clicked "Search"
----------------------------

find_speed(0, 10, 0) => 0
find_speed(10, 20, 0) => 0
find_speed(20, 29, 0) => 0
find_speed(30, 38, 0) => 0
find_speed(40, 48, 0) => 0
find_speed(50, 57, 0) => 0
find_speed(60, 66, 0) => 0
find_speed(70, 76, 0) => 0
find_speed(80, 85, 0) => 0
find_speed(90, 94, 0) => 0
find_speed(100, 104, 0) => 0
find_speed(110, 113, 0) => 0
find_speed(120, 122, 0) => 0
find_speed(130, 132, 0) => 0
find_speed(140, 141, 0) => 0
find_speed(150, 150, 0) => 0
find_speed(160, 160, 0) => 0
find_speed(170, 170, 0) => 0
find_speed(181, 181, 0) => 0
find_speed(193, 193, 0) => 0
find_speed(205, 205, 0) => 0
find_speed(218, 218, 0) => 0
find_speed(232, 232, 0) => 0
find_speed(247, 247, 0) => 0
find_speed(263, 263, 0) => 0
find_speed(280, 280, 0) => 0
find_speed(298, 298, 0) => 0
find_speed(317, 317, 0) => 0
find_speed(338, 338, 0) => 0
find_speed(360, 360, 0) => 0
find_speed(384, 384, 0) => 0
find_speed(409, 409, 0) => 0
find_speed(436, 436, 0) => 0
find_speed(465, 465, 0) => 0
find_speed(496, 496, 0) => 0
find_speed(529, 529, 0) => 0

----------------------------
The "Set Communication Speed" dialog box came up again, so I used 47
as the clock divider.
Thats what it used to be when it was working.
----------------------------

preset_communication_speed(47)
set_speed() => 0
read_data_byte/word((0080..008F) [16] => by block (in 0 ms)
executing P&E_ICD.hwc

done P&E_ICD.hwc

read_data_byte/word((0090..00AF) [32] => by block (in 10 ms)
read_bd_byte(0xFF07)
=> 0x0
get_cpu_values() => 0, 0, 0, 0, 0, 0, 0
BDM speed problem
read_data_byte/word((0080..009E) [31] => by block (in 0 ms)
test_for_freeze() => 0
read_data_byte/word((009F..00D6) [56] => by block (in 10 ms)

in>

Then an error dialog comes up that says:

Communication To The Target Failed
(Target MCU Has No CLock Or Wrong BDM Speed is used
Or Dirivitive Is Secured!)

Then

There Is No Target Connected.
Please Connect A Target Before Loading An Executable File.

Does this mean that its probably the pin?

Thanks
Nicholas




Hi Nicholas:

Did you double ckeck the BDM connections. If you 6-pin connector is
not connected properly, the BDM box won't be able to communicate to
the board.

And just to be sure, is the power supply on? Sometimes you have to go
to the basics...

Do you use a Lab power supply? If so, check that the current
limitation is not too low. Otherwise, there is not enough current to
power up the board, therefore, no programming can happen.

I would the BKDG pin as the last suspect. Most of the time there are
other problems that prevent the programming.

Regards,

Alex

--- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
>
> Thanks for the replies.
>
> I haven't been able to debug using other software, as I don't have
> any other software to try. This may be the answer though. I tried
> using the P&E Unsecure program, and there was no comms either.
>
> I get the following from Unsecure 12:
>
> Interface Cable Detected.
> Searching For Interface Speed..................
> ERROR - Communicating With Target.
> Appropriate Interface Speed Not Found.
>
> When I launch the CodeWarrior Debugger, this is what I get:
>
> !Command < attributes CACHESIZE 1000
> !bckcolor 50331647
> !font 'Courier New' 9 BLACK
> !AUTOSIZE on
> !ACTIVATE Data:2 Procedure Data:1 Source Register Assembly Memory
> Command
> done C_layout.hwl
>
> Loading Target ...
> SETCOMM DRIVER NOPROTOCOL NOPERIODICAL ""
> SETCOMM COMPORT NONE
> Initializing STARTUP command file:
> CMDFILE STARTUP ON ".\cmd\p&e_icd_startup.cmd"
> Initializing RESET command file:
> CMDFILE RESET ON ".\cmd\p&e_icd_reset.cmd"
> Initializing PRELOAD command file:
> CMDFILE PRELOAD ON ".\cmd\p&e_icd_preload.cmd"
> Initializing POSTLOAD command file:
> CMDFILE POSTLOAD ON ".\cmd\p&e_icd_postload.cmd"
> Initializing VPPON command file:
> CMDFILE VPPON ON ".\cmd\p&e_icd_vppon.cmd"
> Initializing VPPOFF command file:
> CMDFILE VPPOFF ON ".\cmd\p&e_icd_vppoff.cmd"
> Initializing UNSECURE command file:
> CMDFILE UNSECURE ON ".\cmd\P&E_ICD_erase_unsecure_hcs12.cmd"
> close_port()
> parallel: open_port(1);
> force_background_mode() => 0
> write_control()
> reset_cable()
> check_cable_error() => 0
>
> ----------------------------
> The "Set Communication Speed" dialog box popped up, and I
> clicked "Search"
> ----------------------------
>
> find_speed(0, 10, 0) => 0
> find_speed(10, 20, 0) => 0
> find_speed(20, 29, 0) => 0
> find_speed(30, 38, 0) => 0
> find_speed(40, 48, 0) => 0
> find_speed(50, 57, 0) => 0
> find_speed(60, 66, 0) => 0
> find_speed(70, 76, 0) => 0
> find_speed(80, 85, 0) => 0
> find_speed(90, 94, 0) => 0
> find_speed(100, 104, 0) => 0
> find_speed(110, 113, 0) => 0
> find_speed(120, 122, 0) => 0
> find_speed(130, 132, 0) => 0
> find_speed(140, 141, 0) => 0
> find_speed(150, 150, 0) => 0
> find_speed(160, 160, 0) => 0
> find_speed(170, 170, 0) => 0
> find_speed(181, 181, 0) => 0
> find_speed(193, 193, 0) => 0
> find_speed(205, 205, 0) => 0
> find_speed(218, 218, 0) => 0
> find_speed(232, 232, 0) => 0
> find_speed(247, 247, 0) => 0
> find_speed(263, 263, 0) => 0
> find_speed(280, 280, 0) => 0
> find_speed(298, 298, 0) => 0
> find_speed(317, 317, 0) => 0
> find_speed(338, 338, 0) => 0
> find_speed(360, 360, 0) => 0
> find_speed(384, 384, 0) => 0
> find_speed(409, 409, 0) => 0
> find_speed(436, 436, 0) => 0
> find_speed(465, 465, 0) => 0
> find_speed(496, 496, 0) => 0
> find_speed(529, 529, 0) => 0
>
> ----------------------------
> The "Set Communication Speed" dialog box came up again, so I used 47
> as the clock divider.
> Thats what it used to be when it was working.
> ----------------------------
>
> preset_communication_speed(47)
> set_speed() => 0
> read_data_byte/word((0080..008F) [16] => by block (in 0 ms)
> executing P&E_ICD.hwc
>
> done P&E_ICD.hwc
>
> read_data_byte/word((0090..00AF) [32] => by block (in 10 ms)
> read_bd_byte(0xFF07)
> => 0x0
> get_cpu_values() => 0, 0, 0, 0, 0, 0, 0
> BDM speed problem
> read_data_byte/word((0080..009E) [31] => by block (in 0 ms)
> test_for_freeze() => 0
> read_data_byte/word((009F..00D6) [56] => by block (in 10 ms)
>
> in>
>
> Then an error dialog comes up that says:
>
> Communication To The Target Failed
> (Target MCU Has No CLock Or Wrong BDM Speed is used
> Or Dirivitive Is Secured!)
>
> Then
>
> There Is No Target Connected.
> Please Connect A Target Before Loading An Executable File.
>
> Does this mean that its probably the pin?
>
> Thanks
> Nicholas




I have checked the BDM connections. I checked for traffic on the BKGD
pin, and its there.

Power is on. All the lights are on. I am using a PC power supply
through a LM317 regulator, so there shouldn't be any problems with
current. I measured the current going to the chip somewhere round
50mA when running normally. What does it get up to?

The thing that makes me think the pin is at fault is that it worked
before, then suddenly stopped. Also none of the programs are able to
detect the clock speed of the chip.

Is there a way to test the pin? Is there traffic on the pin when the
BDM programmer is disconnected?

Nicholas

--- In 68HC12@68HC..., "a_ribero" <a_ribero@y...> wrote:
>
> Hi Nicholas:
>
> Did you double ckeck the BDM connections. If you 6-pin connector is
> not connected properly, the BDM box won't be able to communicate to
> the board.
>
> And just to be sure, is the power supply on? Sometimes you have to
go
> to the basics...
>
> Do you use a Lab power supply? If so, check that the current
> limitation is not too low. Otherwise, there is not enough current to
> power up the board, therefore, no programming can happen.
>
> I would the BKDG pin as the last suspect. Most of the time there are
> other problems that prevent the programming.
>
> Regards,
>
> Alex





Symptom suggest a reset problem. Check the reset line or the
oscillator not ticking.

--- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
>
> I have checked the BDM connections. I checked for traffic on the BKGD
> pin, and its there.
>
> Power is on. All the lights are on. I am using a PC power supply
> through a LM317 regulator, so there shouldn't be any problems with
> current. I measured the current going to the chip somewhere round
> 50mA when running normally. What does it get up to?
>
> The thing that makes me think the pin is at fault is that it worked
> before, then suddenly stopped. Also none of the programs are able to
> detect the clock speed of the chip.
>
> Is there a way to test the pin? Is there traffic on the pin when the
> BDM programmer is disconnected?
>
> Nicholas
>
> --- In 68HC12@68HC..., "a_ribero" <a_ribero@y...> wrote:
> >
> > Hi Nicholas:
> >
> > Did you double ckeck the BDM connections. If you 6-pin connector is
> > not connected properly, the BDM box won't be able to communicate to
> > the board.
> >
> > And just to be sure, is the power supply on? Sometimes you have to
> go
> > to the basics...
> >
> > Do you use a Lab power supply? If so, check that the current
> > limitation is not too low. Otherwise, there is not enough current to
> > power up the board, therefore, no programming can happen.
> >
> > I would the BKDG pin as the last suspect. Most of the time there are
> > other problems that prevent the programming.
> >
> > Regards,
> >
> > Alex




I thought it might be the oscillator, so thats what I checked first.
There is clock coming out of the ECLK, so I think the oscillator is
working.

I will check the RESET line and let you know what I find.

Thanks
Nicholas

--- In 68HC12@68HC..., "zeta_alpha2002" <zeta_alpha2002@y...>
wrote:
>
> Symptom suggest a reset problem. Check the reset line or the
> oscillator not ticking. >
>
> --- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
> >
> > I have checked the BDM connections. I checked for traffic on the
BKGD
> > pin, and its there.
> >
> > Power is on. All the lights are on. I am using a PC power supply
> > through a LM317 regulator, so there shouldn't be any problems
with
> > current. I measured the current going to the chip somewhere round
> > 50mA when running normally. What does it get up to?
> >
> > The thing that makes me think the pin is at fault is that it
worked
> > before, then suddenly stopped. Also none of the programs are able
to
> > detect the clock speed of the chip.
> >
> > Is there a way to test the pin? Is there traffic on the pin when
the
> > BDM programmer is disconnected?
> >
> > Nicholas
> >
> > --- In 68HC12@68HC..., "a_ribero" <a_ribero@y...> wrote:
> > >
> > > Hi Nicholas:
> > >
> > > Did you double ckeck the BDM connections. If you 6-pin
connector is
> > > not connected properly, the BDM box won't be able to
communicate to
> > > the board.
> > >
> > > And just to be sure, is the power supply on? Sometimes you have
to
> > go
> > > to the basics...
> > >
> > > Do you use a Lab power supply? If so, check that the current
> > > limitation is not too low. Otherwise, there is not enough
current to
> > > power up the board, therefore, no programming can happen.
> > >
> > > I would the BKDG pin as the last suspect. Most of the time
there are
> > > other problems that prevent the programming.
> > >
> > > Regards,
> > >
> > > Alex




Your tried and check
1. unsecure
2. BDM line
3. Oscillator is oscillating
4. If RESET is okay then

Bad MCU, it got sick and fried.
--- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
>
> I thought it might be the oscillator, so thats what I checked first.
> There is clock coming out of the ECLK, so I think the oscillator is
> working.
>
> I will check the RESET line and let you know what I find.
>
> Thanks
> Nicholas
>
> --- In 68HC12@68HC..., "zeta_alpha2002" <zeta_alpha2002@y...>
> wrote:
> >
> > Symptom suggest a reset problem. Check the reset line or the
> > oscillator not ticking.
> >
> >
> >
> >
> > --- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
> > >
> > > I have checked the BDM connections. I checked for traffic on the
> BKGD
> > > pin, and its there.
> > >
> > > Power is on. All the lights are on. I am using a PC power supply
> > > through a LM317 regulator, so there shouldn't be any problems
> with
> > > current. I measured the current going to the chip somewhere round
> > > 50mA when running normally. What does it get up to?
> > >
> > > The thing that makes me think the pin is at fault is that it
> worked
> > > before, then suddenly stopped. Also none of the programs are able
> to
> > > detect the clock speed of the chip.
> > >
> > > Is there a way to test the pin? Is there traffic on the pin when
> the
> > > BDM programmer is disconnected?
> > >
> > > Nicholas
> > >
> > > --- In 68HC12@68HC..., "a_ribero" <a_ribero@y...> wrote:
> > > >
> > > > Hi Nicholas:
> > > >
> > > > Did you double ckeck the BDM connections. If you 6-pin
> connector is
> > > > not connected properly, the BDM box won't be able to
> communicate to
> > > > the board.
> > > >
> > > > And just to be sure, is the power supply on? Sometimes you have
> to
> > > go
> > > > to the basics...
> > > >
> > > > Do you use a Lab power supply? If so, check that the current
> > > > limitation is not too low. Otherwise, there is not enough
> current to
> > > > power up the board, therefore, no programming can happen.
> > > >
> > > > I would the BKDG pin as the last suspect. Most of the time
> there are
> > > > other problems that prevent the programming.
> > > >
> > > > Regards,
> > > >
> > > > Alex




Yip. The RESET line is fine.

1. Can't unsecure. Unsecure programs can't communicate.
2. BDM BKGD line is working. There is traffic on the pin, but it
looks like there's no reply.
3. Oscillator is working. It is buffered on ECLK.
4. Reset line is good. Comes down for 200ms or so, then back up.

Nicholas

--- In 68HC12@68HC..., "zeta_alpha2002" <zeta_alpha2002@y...>
wrote:
>
> Your tried and check
> 1. unsecure
> 2. BDM line
> 3. Oscillator is oscillating/
> 4. If RESET is okay then
>
> Bad MCU, it got sick and fried. >
> --- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
> >
> > I thought it might be the oscillator, so thats what I checked
first.
> > There is clock coming out of the ECLK, so I think the oscillator
is
> > working.
> >
> > I will check the RESET line and let you know what I find.
> >
> > Thanks
> > Nicholas
> >
> > --- In 68HC12@68HC..., "zeta_alpha2002"
<zeta_alpha2002@y...>
> > wrote:
> > >
> > > Symptom suggest a reset problem. Check the reset line or the
> > > oscillator not ticking.
> > >
> > >
> > >
> > >
> > > --- In 68HC12@68HC..., "pickleza" <pickleza@y...> wrote:
> > > >
> > > > I have checked the BDM connections. I checked for traffic on
the
> > BKGD
> > > > pin, and its there.
> > > >
> > > > Power is on. All the lights are on. I am using a PC power
supply
> > > > through a LM317 regulator, so there shouldn't be any problems
> > with
> > > > current. I measured the current going to the chip somewhere
round
> > > > 50mA when running normally. What does it get up to?
> > > >
> > > > The thing that makes me think the pin is at fault is that it
> > worked
> > > > before, then suddenly stopped. Also none of the programs are
able
> > to
> > > > detect the clock speed of the chip.
> > > >
> > > > Is there a way to test the pin? Is there traffic on the pin
when
> > the
> > > > BDM programmer is disconnected?
> > > >
> > > > Nicholas
> > > >
> > > > --- In 68HC12@68HC..., "a_ribero" <a_ribero@y...>
wrote:
> > > > >
> > > > > Hi Nicholas:
> > > > >
> > > > > Did you double ckeck the BDM connections. If you 6-pin
> > connector is
> > > > > not connected properly, the BDM box won't be able to
> > communicate to
> > > > > the board.
> > > > >
> > > > > And just to be sure, is the power supply on? Sometimes you
have
> > to
> > > > go
> > > > > to the basics...
> > > > >
> > > > > Do you use a Lab power supply? If so, check that the current
> > > > > limitation is not too low. Otherwise, there is not enough
> > current to
> > > > > power up the board, therefore, no programming can happen.
> > > > >
> > > > > I would the BKDG pin as the last suspect. Most of the time
> > there are
> > > > > other problems that prevent the programming.
> > > > >
> > > > > Regards,
> > > > >
> > > > > Alex