I tried adapting the blinky sample project to work with a custom board. After an hour or two I was able to define the GPIOs of my schematic including I2C with the device tree visualizer in nrf Connect extension for VS Code.
I am able to build the project with the custom board successfully. Flashing the custom board sometimes succeeded but usually failed, and the "Connected Devices" tab in nRF Connect in VS Code successfully showed the nrf5340 device on the Ezurio module without failure.
I launched J-Link commander and noticed problems resetting the device at the default 4000kHz. I lowered this to 100kHz and it worked fine.
The issue seems to be that SWD at 4Mhz is too fast a SWD speed over my 6" ribbon cable.
Next I tried changing the board back to the nrf5340DK and flashing to the SWD connector directly. This also failed in the same manner.
I'm convinced that I cannot flash/debug at 4Mhz using my J-Link device and ribbon cable. It works fine using the built-in J-Link emulator on the nrf5340DK.
How can I override the SWD clock speed to flash/debug within VS Code's nRF Connect extension?
I have no problem modifying configuration files if that's the only way. I tried modifying runners.yaml to change the --clockspeed parameter but it seems that it's not getting passed through to nrfjprog.
How can I lower my SWD speed for flashing/debugging without abandoning nRF Connect?
-Thanks
-Brad