---
** [tickets:#386] OpenOCD can't connect to Dialog DA1469x**
**Status:** new
**Milestone:** 0.11.0
**Labels:** swd da1469x jlink
**Created:** Wed Mar 15, 2023 02:30 PM UTC by Maximilian Gerhardt
**Last Updated:** Wed Mar 15, 2023 02:30 PM UTC
**Owner:** nobody
**Attachments:**
- [dia.cfg](https://sourceforge.net/p/openocd/tickets/386/attachment/dia.cfg)
(1.8 kB; application/octet-stream)
-
[jlink_logs.txt](https://sourceforge.net/p/openocd/tickets/386/attachment/jlink_logs.txt)
(1.5 kB; text/plain)
-
[jlinkexe_good_connect.sr](https://sourceforge.net/p/openocd/tickets/386/attachment/jlinkexe_good_connect.sr)
(3.6 kB; application/octet-stream)
-
[openocd_ap_info_good_connect.txt](https://sourceforge.net/p/openocd/tickets/386/attachment/openocd_ap_info_good_connect.txt)
(1.8 kB; text/plain)
-
[openocd_bad_connect.sr](https://sourceforge.net/p/openocd/tickets/386/attachment/openocd_bad_connect.sr)
(2.3 kB; application/octet-stream)
Specifically, I have a custom DA14695 board, but it's the same with a [USB
DevKit](https://www.renesas.com/br/en/products/wireless-connectivity/bluetooth-low-energy/da14695-00hqdevkt-u-smartbond-da14695-bluetooth-low-energy-52-usb-development-kit).
Chip datasheet [see
here](https://www.renesas.com/br/en/products/wireless-connectivity/bluetooth-low-energy/da14695-multi-core-bluetooth-52-soc-system-power-management-unit#document).
It's a Cortex-M33 and Cortex-M0+ coprocessor (runs Bluetooth stack). Each have
their own SWDIO+SWDCLK signals. I'm only interested in connecting to the
Cortex-M33 main processor right now.
Currently, the Dialog DA1469x is unsupported in OpenOCD. Only the proprietary
JLinkExe can connect it. I want to be able to use OpenOCD and other debug
adapters. So to get started with getting OpenOCD + JLink to work first without
changing the debug adapter.
this however fails horribly with the error
Debug: 1132 515 jlink.c:2197 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Error: 1133 517 adi_v5_swd.c:144 swd_connect(): Error connecting DP: cannot
read IDR
While when using JLinkExe, it detects the chip just fine
Found SW-DP with ID 0x0BE12477
AP0: AHB-AP (IDR: 0x14770015)
Found Cortex-M33 r0p2, Little endian.
OpenOCD fails at one of the very first steps, which is in the SWD protocol to
do a LINERESET followed by the JTAG->SWD switch sequence, a LINERESET again and
reading out the IDCODE. Looking at the SWD signals with a logic analyzers and
PulseView, I compared the different signals that OpenOCD and JLinkExe produced
and found that JLinkExe does a few more LINERESETs as the first attempt of
reading IDCode actually fails, without a JTAG->SWD sequence in between.
I'd also like to note that after using JLinkExe to connect, through some
command sequence that I cannot reproduce anymore, openocd managed to connect
using that config file. That's why I at least now -irlen 8 is right, it would
not do that with -irlen 4. From there I coud do a "dap info".
Here attached are the PulseView session files which should have the signal
trace (with SWD decoding) in it, from JLinkExe and OpenOCD, next to the config
file and JLinkExe output (sadly there are no verbose logs there). The OpenOCD
command I'm using is 'openocd -f interface/jlink.cfg -c "transport select swd"
-s . -f dia.cfg -c "gdb_memory_map disable"'
I'd be happy for any pointer on how to get OpenOCD to talk to the Cortex-M33
successfully.
---
Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.