The BDM has been re-enabled

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

The BDM has been re-enabled

2,947 Views
goelectrons
Contributor I

I have been developing for 9S12DT256 for several years using CodeWarrior Pro and a P&E Micro USB-ML-12 BDM module version C. All of the drivers for the BDM are up to date as well as the firmware. I don't have the version of CodeWarrior available right now but I can provide it. 

 

As soon as the PLL is enabled (first time I have ever used it) the debugger streams the error "The BDM has been re-enabled" several times and communication is lost.

 

My simple test program I am using to work this problem out just toggles a bit in a while loop. There is only a problem with the HiWave debugger. I tried the P&E debugger and it steps through the program fine and I have verified that the operating frequency has changed as it is supposed to, ie I can change the frequency of the output as desired by changing the PLL settings. 

 

Any ideas?

Labels (1)
Tags (1)
0 Kudos
Reply
7 Replies

1,773 Views
CrasyCat
Specialist III

Hello

 

According to my understanding you are changing the value of the PLL within the application.

 

If you are doing so you need to configure your connection to tell the debugger PLL might change in the application.

 

In order to do that:

    - Select Multilink/Cycllone Pro -> Connection or Communication

    - In the P&E ICD12, Cable12, Multilink, Cyclone Pro Connection dialog activate the Special Setup tab.

    - Check Set CLKSW bit in BDM control register.

   - Click on OK to close the dialog.

 

From now on the debugger should be able to resynchronize after a change of PLL

 

CrasyCat

0 Kudos
Reply

1,773 Views
goelectrons
Contributor I

Previously I was setting the PLL in the CPU bean but of course I would lose communication before I even got to the default breakpoint @ main() so I removed it from the bean and did it myself.

 

The checkbox you speak of is already checked, I probably should have mentioned that.

 

-g 

0 Kudos
Reply

1,773 Views
goelectrons
Contributor I

I downloaded the newest version of CodeWarrior for HCS12(X) v5.0 and all my problems went away.

 

Happy, happy, happy.

 

-cheers

0 Kudos
Reply

1,773 Views
goelectrons
Contributor I

Ok, the last message was a bit premature I guess.

 

I am used to hitting the debug icon in CW and having it erase and program the device and break at the beginning of main(). Now when I do this I get a connection manager dialog. I cannot seem to figure out what is necessary to get it to reliably find the communication speed and re-program the device. The connection manager does not remember my setting for "Autodetect communications speed".

 

Error while loading diagnostics algorithm.... over and over and over.

0 Kudos
Reply

1,773 Views
kef
Specialist I

When S12(X) MCU is secured, P&E debug connection has problems with communication speed etc. Did you try to unsecure MCU with P&E Unsecure_12 utility?

 

BTW I wonder why P&E has problems with BDM communication speed, since BDM SYNC "command" works even in secured mode and allows to determine BDM speed quite precisely. SYNC isn't supported by old HC12 MCUs, but these old HC12 don't have chip security. Why then we are having problems? Or why debugger doesn't tell clearly MCU is secured.

0 Kudos
Reply

1,773 Views
goelectrons
Contributor I

The unsecure utility reports that the chip is not secured.

0 Kudos
Reply

1,773 Views
cfu
Contributor I

Hello, I'm having a similar problem with CW4.5 and the P&E USB Multilink: I suddenly started getting a failure message "Error while loding diagnostics algorithm to taget system,the chip may be secured,or the derivative selected may be wrong." when I try to burn the application on the target,  The chip is definitely not secured.

Most weird is that, even though the failure message always appears, HI-WAVE sometimes DOES manage to program the device, sometimes not.

Does anyone know what the problem can be?

 

Thanx a lot!

0 Kudos
Reply