Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended launch.json is slow to connect due to no "adapter speed" setting #471

Open
recursivenomad opened this issue Feb 2, 2024 · 0 comments

Comments

@recursivenomad
Copy link

recursivenomad commented Feb 2, 2024

Although the Getting Started documentation suggests that you should launch OpenOCD with adapter speed 5000, the launch.json examples included here (and subsequently recommended in the Getting Started guide) do not pass an adapter speed to OpenOCD, and as a result the debugger is very slow to connect and OpenOCD will output the warning:

Warn : An adapter speed is not selected in the init scripts. OpenOCD will try to run the adapter at the low speed (100 kHz)

This is 50 times slower (!) than the suggested speed of 5000 kHz, and 200 times slower (!!) than the seemingly maximum adapter speed able to be set of 20000 kHz.

Side note: The RP2040 datasheet recommends a maximum of 24 MHz. 20 MHz appears to be a consistently stable value for me, but the RP2040 datasheet does mention that cable length and quality can influence what is stable.

A simple solution to this problem would be to add the following lines to the example launch.json files (and documentation):

"openOCDLaunchCommands": [
    "adapter speed 5000"
],

Another place that may benefit from such a change could be the launch.json created by raspberrypi/pico-project-generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant