Debugging problems

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debugging problems

跳至解决方案
2,286 次查看
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

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
2,053 次查看
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 项奖励
回复
2 回复数
2,050 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

2,054 次查看
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 项奖励
回复