connect_assert_srst is not usable and srst_nogate is completely wrong with SAMD and SAME5x MCUs. See remarks in tcl/target/at91samdXX.cfg
~~~ # SAMD DSU will hold the CPU in reset if TCK is low when RESET_N # deasserts (see datasheet Atmel-42181E–SAM-D21_Datasheet–02/2015, section 12.6.2) ... # SRST (wired to RESET_N) resets debug circuitry ~~~ See also https://review.openocd.org/c/openocd/+/4296/1/contrib/shell-helpers/samd_unprotect_on_RPi.sh The patch uses non-standard Atmel's "cold plugging mode" as a substitute for connect_assert_srst --- ** [tickets:#383] Connection issue from bcm2835gpio with connect_assert_srst on atsamc21g18a** **Status:** new **Milestone:** 0.11.0 **Created:** Fri Feb 17, 2023 05:43 AM UTC by Luke V **Last Updated:** Fri Feb 17, 2023 05:43 AM UTC **Owner:** nobody **Attachments:** - [error_log](https://sourceforge.net/p/openocd/tickets/383/attachment/error_log) (28.6 kB; application/octet-stream) I'm attempting to flash a board using an `atsamc21g18a` from a Raspberry Pi 4 running OpenOCD 0.12.0. I'm using the following configuration: ~~~ adapter driver bcm2835gpio bcm2835gpio peripheral_base 0xFE000000 bcm2835gpio speed_coeffs 236181 60 adapter gpio swclk 25 adapter gpio swdio 24 adapter gpio srst 18 transport select swd set CHIPNAME at91samc21g18 source [find target/at91samdXX.cfg] reset_config srst_only srst_nogate connect_assert_srst adapter srst delay 100 adapter srst pulse_width 100 adapter speed 100 init targets reset halt ~~~ This fails to connect, but succeeds when `connect_assert_srst` is removed. Full log attached (weird paths are from running on NixOS). I believe this issue is also preventing me from connecting to a board that drives the SWD pins. --- 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.