-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWD config holds nRF in reset making debugging impossible #51
Comments
Issue #51 points out the rest pin is held by the swd openocd config file. Fixing ftdi_layout_init to fix it.
Good catch. I had mostly been testing and using it with the JTAG harness and only connecting VTGT, GND, SWCLK, and SWDIO - leaving reset disconnected. Fixed in 6f935c4 What version of openocd are you using? The config files were originally made before v10. I've hesitated to fix the depricated parts without testing against a few older versions of openocd - i'd prefer to have one config file that works against V9-11 and throws deprecation warnings than a separate file for each version. I know i'll have to fix it sooner or later, so i'll keep this issue open. Glad you're finding tigard useful!! |
I'm using v11 (commit from late Dec) And yeah I also tried to only do it like this (VTGT, GND, SWCLK and SWDIO) using jumper but for some reason that's not working at all (only have success when connecting over the P18 debug header - without it I just get 1s read back). If you have any ideas on how to debug this I would also immensly appreciate it cause the real target doesn't have a 10 pin header (it's an AirTag) |
I haven't used more recent nordic dev boards, but iirc some of the older ones detected the presence of the debugger and disabled/disconnected the built-in debugger when attached. Could that be it? |
I mean it works over P18 and I don't see detecting logic on the schematics (PCA10040_Schematic_And_PCB.pdf)... For me it seems like the nRF struggles to pull the SWDIO line low (first one is over P18 second one is using jumpers): |
Disclaimer:
I'm new to HW stuff so maybe this is sth completely obvious to anyone except for me, but it cost me two days to figure out so I thought I should share it here.
I tried to debug an nRF Dev Board over the P18 header using the tigard and I kept getting a "poll 4 timeout" Error during the init sequence in openocd. The reason why this happens is that the openocd config holds the nRF in reset and so it's not responding leading to OCD erroring out.
The solution is pretty simple:
Change
ftdi_layout_init 0x0018 0x05fb
toftdi_layout_init 0x0018 0x055b
in the init file to not pull up the reset pin during init. And after that everything works (also reseting the board via telnet works, so I don't think I broke anything, just changed the initial value of the pin)(As a sidenote I think the config file is out of date, it should be
ftdi layout_init
instead offtdi_layout_init
- I got a couple of DEPRECATED warnings before changing that)And I have to say: Thanks for providing such an awesome tool, it really helps me with my project!
The text was updated successfully, but these errors were encountered: