adapter speed changes in target events fails with a fixed speed adapter
No wonder as you're using the latest but too old release (0.12 from January 2023) and RP2350 flash support was merged in April 2025. Don't combine config files downloaded from untrustworthy sources with different OpenOCD binary. Either use fresh upstream git master (build from source or a prebuild pack) - it will support rp2350 except RISC-V cores, or use RPi fork https://github.com/raspberrypi/openocd for complete rp2350 support
And also note that Info: Unable to match requested speed 8000 kHz, using 4000 kHz is just an informational message, not error at all!
I don't have a NUCLEO-F401RE. I tested on a blackpill (STM32F401CC) with an old on-board st-link and no problems at speeds from original config. Just noticed that st-link Info : STLINK V2J32S0 (API v2) VID:PID 0483:3748 ... > reset init ... Unable to match requested speed 8000 kHz, using 4000 kHz Unable to match requested speed 8000 kHz, using 4000 kHz reduces the speed substantially. Therefore I reconnect to FT232H based adapter and tested at 12 MHz - flash erase/write/verify works just fine. Also...
Don't be fooled by this simplified diagram found in ARM documentation: it's so simplified that it's wrong. SWDIO correctly changes on failing SWCLK edge when the adapter transmits and on rising SWCLK edge when SWDP transmits. See 8690: target/arm_adi: add URLs of latest ARM ADI spec | https://review.openocd.org/c/openocd/+/8690 https://documentation-service.arm.com/static/5ea6eaba9931941038df04ff?token=
Thanks for the report. Could you please submit a patch to https://review.openocd.org ? You may find details in https://openocd.org/doc/doxygen/html/patchguide.html
Thanks for reporting! I was able to reproduce the problem on the older K66FX1M0 Your solution is correct, but... Please be aware that OpenOCD project requires submitting patches to the Gerrit review system, we are not able to accept patches from mails and tickets. See https://openocd.org/doc/doxygen/html/patchguide.html In this case I made an exception as I want to remove the assert() to prevent the MCU locking effect (and I'm the author of this bug ;-) Please test 8719: flash/nor/kinetis: fix assertion...
Very strange! Finding MEM-AP is the generic ARM ADI stuff and is used mainly for all ARM Cortex cores. If that part of OpenOCD were so wrong to screw up some bits of MEM-AP read/write then no Cortex core could be debugged! Please start over with clean OpenOCD and libjaylink. Make your best to use the same conditions for both OpenOCD and jlink.exe (e.g. JTAG clock 100kHz on OpenOCD versus 4MHz on jlink.exe) Try the low level OpenOCD commands to investigate DP and AP registers manually: $dap_name dpreg...