**#define STLINK_JTAG_UNKNOWN_JTAG_CHAIN 0x04** The Stlink denies to connect to non-STM jtag devices.
--- ** [tickets:#338] Unknown/unexpected STLINK status code 0x4** **Status:** new **Milestone:** 0.11.0 **Created:** Thu Feb 24, 2022 08:10 AM UTC by Weixuan XIAO **Last Updated:** Thu Feb 24, 2022 08:10 AM UTC **Owner:** nobody Hi, I am trying to connect to a ST-Link using dapdirect_jtag transport: `openocd -f ./interface/stlink-dap.cfg -c "transport select dapdirect_jtag" -f ./target/bcm2836.cfg -d` During the initialization, the USB version check and voltage check seem ok. However the error check reports an unknown/unexpected status code, and it fails. Debug: 199 34 stlink_usb.c:5055 stlink_dap_init(): stlink_dap_init() Debug: 200 34 stlink_usb.c:3685 stlink_open(): stlink_open Debug: 201 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x3744 serial: Debug: 202 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x3748 serial: Debug: 203 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x374b serial: Debug: 204 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x374d serial: Debug: 205 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x374e serial: Debug: 206 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x374f serial: Debug: 207 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x3752 serial: Debug: 208 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x3753 serial: Debug: 209 34 stlink_usb.c:3697 stlink_open(): transport: 3 vid: 0x0483 pid: 0x3754 serial: Info : 210 63 stlink_usb.c:1429 stlink_usb_version(): STLINK V2J28S7 (API v2) VID:PID 0483:3748 Debug: 211 73 stlink_usb.c:1654 stlink_usb_exit_mode(): MODE: 0x01 Info : 212 111 stlink_usb.c:1465 stlink_usb_check_voltage(): Target voltage: 3.248742 Debug: 213 111 stlink_usb.c:1722 stlink_usb_init_mode(): MODE: 0x01 Debug: 214 111 stlink_usb.c:3088 stlink_dump_speed_map(): Supported clock speeds are: Debug: 215 111 stlink_usb.c:3091 stlink_dump_speed_map(): 9000 kHz Debug: 216 111 stlink_usb.c:3091 stlink_dump_speed_map(): 4500 kHz Debug: 217 111 stlink_usb.c:3091 stlink_dump_speed_map(): 2250 kHz Debug: 218 111 stlink_usb.c:3091 stlink_dump_speed_map(): 1125 kHz Debug: 219 111 stlink_usb.c:3091 stlink_dump_speed_map(): 562 kHz Debug: 220 111 stlink_usb.c:3091 stlink_dump_speed_map(): 281 kHz Debug: 221 111 stlink_usb.c:3091 stlink_dump_speed_map(): 140 kHz Debug: 222 127 stlink_usb.c:1125 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4 Error: 223 127 stlink_usb.c:3740 stlink_open(): init mode failed (unable to connect to the target) Debug: 224 134 stlink_usb.c:1654 stlink_usb_exit_mode(): MODE: 0x01 Debug: 225 135 command.c:555 run_command(): Command 'init' failed with error code -4 The build I use is commit 94e7535be85a7bd5905dec68b6eae9a98aae0d7e on master branch, including the resolution https://review.openocd.org/6443 of https://sourceforge.net/p/openocd/tickets/325/ So, I assume they are not duplicated. The version info is: `Open On-Chip Debugger 0.11.0+dev-00572-g94e7535be (2022-02-24-09:00)` --- 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.