K22DN512 not responding to SWD commands when nRESET not asserted

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K22DN512 not responding to SWD commands when nRESET not asserted

ソリューションへジャンプ
1,168件の閲覧回数
andrewparlane
Contributor IV

I'm attempting to bring up a new board of ours that has a K22DN512VLH5 on it.

We are using Keil uVision4 with a ULink-me programmer.

When we try and program the chip, I get a "SWD communications fail" error. Scoping the SWD and reset lines, I see:

1) reset asserted

2) line reset (50 clock cycles, data high)

3) JTAG to SWD switch.

4) line reset

5) 8 low clock cycles

6) SWD read DP addr 0 (idcode reg), ACK, correct data.

7) ... more stuff that I haven't decoded. Probably checking the MDM-AP status register and setting C_DEBUGEN and CV_VECTORRESET in the AHB-AP.

8) deassert reset

9) 200ms gap

10) SWD write DP addr 4 (ctrl/status reg) --- unlike before the target does not ACK, nor send WAIT or FAIL, it just doesn't respond.

11) line reset --- recover from error

12) 8 low cycles

13) 6) SWD read DP addr 0 (idcode reg),  --- Again no response at all.

... more attempts but the target never replies.

Reasons I can think of for this behavior based on searching are:

1) Protection bits -- Pretty sure this isn't my problem because when I accidentally protect something, I get asked if I want to do a mass erase when programming.

2) Invalid code causing target to reset continuously breaking SWD connection -- Pretty sure this isn't my problem either as I've scoped the reset line and don't see it changing except for when we drive it low with the programmer.

So I'm out of ideas really. Any suggestions on what to try would be fantastic. I have the ability to read / write DP / AP without using the programmer, so I can add in custom calls to read states of anything you think could be helpful.

Thanks,

Andrew

ラベル(2)
0 件の賞賛
返信
1 解決策
814件の閲覧回数
andrewparlane
Contributor IV

I think the problem was caused by having the ezport_cs line pulled down. Although even after fixing this I was still having problems. Unfortunately this project has taken a back burner for now, and i haven't been able to fully solve it.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
815件の閲覧回数
andrewparlane
Contributor IV

I think the problem was caused by having the ezport_cs line pulled down. Although even after fixing this I was still having problems. Unfortunately this project has taken a back burner for now, and i haven't been able to fully solve it.

0 件の賞賛
返信
814件の閲覧回数
apanecatl
Senior Contributor II

Did you place a pull-up reset on the SWD_DIO line?

0 件の賞賛
返信