Debugging problems

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

Debugging problems

Jump to solution
929 Views
filipdossche
Contributor III

Hi,

 

I keep getting erratic debugger behavior. Sometimes it works, sometimes it does not.

I regularly get the folowing error: "Error setting BP @xxxx" and "Error removing BP @xxxx".

xxxx is a hex number.

 

Regularly but less frequent it simply can't connect to the target.

 

It is a real nuisance because when it happens I have have to restart KDS, clean the project, rebuild and try it again.

 

Doe anyone have any suggestions as to what I could do to correct this ( setting, config, ? )

 

My setup is like this:

     - KDS 2.0.0 with additional tools to support KL03Z processor (toolchain etc...)

     - FRDM-KL03Z board.

     - The debug configuration uses the "OpenSDA Embedded debug - USB port" interface.

 

I have noticed the "Debug shift frequency" is set at 5000 Khz and cannot be changed. The associated comment says it should be set at +/- 1/6th of the target clock rate.

maybe that has something to do with it because I know the board starts at 8 Mhz. I have to change the settings to make it work at the 48 Mhz i need.

 

22016_22016.pngpastedImage_0.png

Labels (1)
Tags (2)
0 Kudos
1 Solution
696 Views
filipdossche
Contributor III

Hi Zhang Jun,

Yes, that did make some difference but in the end that was not the reason for all the problems.

The final solution turned out to be really silly.

I was not using the FRDM-KL03Z board on its own but I was also using a digital scope to check my incoming signals.

It turned out that the scope was not plugged into the mains with an earthed mains plug.

Instead, a modified mains plug was used: one without an earth connection so that the scope could be used for measurements where an earthed mains  plug caused problems.

Of course, since then nobody remembered the specially modified plug so when when I started using the scope I did not know either.

I finally found out when I started getting electrical shocks from the scope and the connected freedom board.

Because of the missing earth connection and some filtering capacitors sitting between the mains supply input and the earth connection in the scope there was actually +/- 120 V AC ( half the mains supply ) on the scope's ground.

The filter capacitors don't allow much current so it was not destructive but it sure wrecked havoc on the USB link to the Freedom board.

Connecting the PC's USB ground and that of the freedom board to the scope's ground with the 120 VAC on it is definitely not a good idea !!!

View solution in original post

0 Kudos
2 Replies
696 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Filip,

I suggest you update the firmware with MSD-DEBUG-FRDM-KL03Z_Pemicro_v114.SDA. then reset board and test connection again.

http://cache.freescale.com/files/32bit/software/board_support_packages/FRDM-KL03-QSP.zip

with MSD-DEBUG-FRDM-KL03Z_Pemicro_v114.SDA, I can connect board every time.

attached is my config setting.


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

697 Views
filipdossche
Contributor III

Hi Zhang Jun,

Yes, that did make some difference but in the end that was not the reason for all the problems.

The final solution turned out to be really silly.

I was not using the FRDM-KL03Z board on its own but I was also using a digital scope to check my incoming signals.

It turned out that the scope was not plugged into the mains with an earthed mains plug.

Instead, a modified mains plug was used: one without an earth connection so that the scope could be used for measurements where an earthed mains  plug caused problems.

Of course, since then nobody remembered the specially modified plug so when when I started using the scope I did not know either.

I finally found out when I started getting electrical shocks from the scope and the connected freedom board.

Because of the missing earth connection and some filtering capacitors sitting between the mains supply input and the earth connection in the scope there was actually +/- 120 V AC ( half the mains supply ) on the scope's ground.

The filter capacitors don't allow much current so it was not destructive but it sure wrecked havoc on the USB link to the Freedom board.

Connecting the PC's USB ground and that of the freedom board to the scope's ground with the 120 VAC on it is definitely not a good idea !!!

0 Kudos