probe-rs: Can't flash nRF9160 with HS probe
Describe the bug I can’t flash my nRF9160 using the HS Probe. I’ve just updated the HS probe to the newest firmware, but no change.
It does work with the jlink of the Nordic DK’s (tested with an nRF53 DK). It works with both swd and jtag as the protocol.
To Reproduce
- Have an embedded project (in this case https://github.com/tweedegolf/dis-bootloader)
- Run
cargo flash --release --chip nRF9160_xxAA
Desktop (please complete the following information):
- Windows 11
Additional context Cargo flash is based on the Jan-28 master version (with a small modification so it works nicely with the nrf53). Problem is also with the most recent probe-run.
Trace: https://gist.github.com/diondokter/e8cc8c2ce88cb55ec7b685f14194eb8e (This is not the full trace, because it’s so much that terminal forgets the starting lines. But I think it’s far enough back that all relevant data is there)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 28 (28 by maintainers)
Commits related to this issue
- Increase SWD wait timeout We currently send to the probe that it should retry when it receives a WAIT response for 80 times. But this doesn't seem to be enough, so I've increased it to the maximum of... — committed to k0d/probe-rs by k0d 2 years ago
- Merge #1081 1081: Increase SWD wait timeout r=Yatekii a=k0d We currently send to the probe that it should retry when it receives a WAIT response for 80 times. But this doesn't seem to be enough, so ... — committed to probe-rs/probe-rs by bors[bot] 2 years ago
I’ve been trying lots of things, nothing fixed it yet. However we’re receiving a WAIT response and then quit after that. I just wonder if the JLINK handles that internally itself better than we do. I’m going to hook up the debug probes to a logic analyzer and capture what’s actually sent between the probe and the device.
I’ll check what my probe sends/receives…
also, that other issue looks interesting…I’ll look into it and get back to you…
CMSIS.csv JLink.csv
I’ve just captured the data, haven’t analyzed it myself yet, but I thought I’d post it so you can take a look if/when you have time.
https://github.com/probe-rs/probe-rs/blob/7e6b23c6bc861d1f29c9272197b6de2047d05982/probe-rs/src/session.rs#L511
This runs when dropping the session, so I guess the error happens before that? And then when it fails, we drop the session?