LPC5502 SWD not detected

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

LPC5502 SWD not detected

跳至解决方案
7,936 次查看
christianlees
Contributor III

Hello,

I know a similar question has been asked and I have gone through the solution will no luck.

I cannot get the device to be detected on the SWD interface.  I'm using s Segger JLink EDU.  The board didn't have the XTAL32M_P or XTAL32K_P pins ties to ground so I wired them in as with the pull up on PIO0_5.  The attached schematic shows the current arrangement.

I am seeing 1.052V on C39 as expected.

Could be a power issue, any help is appreciated.

Thanks

Christian

标签 (1)
0 项奖励
回复
1 解答
7,783 次查看
christianlees
Contributor III

I got it to work by getting a newer debugger.  If you are using a Segger Jlink it needs to be later then V8.0 hardware

在原帖中查看解决方案

0 项奖励
回复
8 回复数
7,784 次查看
christianlees
Contributor III

I got it to work by getting a newer debugger.  If you are using a Segger Jlink it needs to be later then V8.0 hardware

0 项奖励
回复
7,917 次查看
christianlees
Contributor III

I took a capture of the a SWD transaction, I don't know the protocol but it looks like the ACK works and it responds.

If I try it from the command line this is the output

Type "connect" to establish a target connection, '?' for help
J-Link>connect LPC5502
Please specify device / core. <Default>: LPC5502
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "LPC5502" selected.


Connecting to target via SWD
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
ERROR: Wrong DM-AP IDCODE detected: 0x00000000
InitTarget() end
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
ERROR: Wrong DM-AP IDCODE detected: 0x00000000
InitTarget() end
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
ERROR: Wrong DM-AP IDCODE detected: 0x00000000
InitTarget() end
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
ERROR: Wrong DM-AP IDCODE detected: 0x00000000
InitTarget() end
Cannot connect to target.
J-Link>

 

0 项奖励
回复
7,904 次查看
christianlees
Contributor III

I've done some reading and it looks like the IDCODE for a Cortex-M33 should be 0xBA04 yet mine is returning 0xBA02, this is clear in the previous captured screen shot. I have both tested from the IDE as well as the JLink console program.

J-Link>readdp 0
Reading DP register 0 = 0x6BA02477 (0 read repetitions needed)

Could this be the issue?  Could it be a damaged MCU?

0 项奖励
回复
7,926 次查看
christianlees
Contributor III

I had already put a pull up on SWD and a pull down on SCK on my programming breakout board.  Putting on the PCB containing the LPC5502 will be difficult.  Is the SWO pin actually required?  It hasn't been on any of my other boards where I have used the same programming break out board.

0 项奖励
回复
7,922 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

If you don't need SWO trace. SWO pin is not needed.

0 项奖励
回复
7,931 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

HI christianlees

I suggest you referring this article to check your SWD debug interface design.

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Design-Considerations-for-Debug/m-p/469565

 

Hope this helps,

Jun Zhang

0 项奖励
回复
7,838 次查看
christianlees
Contributor III

I've changed the MCU, could only get LPC5506 quickly.  Same issue.

Interestingly if I try to debug the incorrect project, one based on an LPC802 then it manages to read the IDCODE and flag it as the incorrect MCU but when I debug the correct project it returns zeros even though the logic analyser says differently.

Sounds like a software issue to me?

Is it a lack of support for the J-Link EDU?

0 项奖励
回复
7,831 次查看
converse
Senior Contributor V

It sounds like you have a problem with your debug circuit. Almost certainly not a software problem. 

0 项奖励
回复