Skip to content

Instantly share code, notes, and snippets.

@ddm
Last active December 28, 2023 15:45
Show Gist options
  • Save ddm/0a985246030aff8265e474a214869ac5 to your computer and use it in GitHub Desktop.
Save ddm/0a985246030aff8265e474a214869ac5 to your computer and use it in GitHub Desktop.
rpi zero openocd SWD config
interface bcm2835gpio
# hexdump -s4 -n4 -e '\"0x\" 4/1 \"%02X\"\"\\n\"\" \"' /proc/device-tree/soc/ranges
bcm2835gpio_peripheral_base 0x20000000
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
bcm2835gpio_speed_coeffs 146203 36
# bcm2835gpio_swd_nums SWDCLK SWDIO
bcm2835gpio_swd_nums 25 24
# bcm2835gpio_srst_num RST
bcm2835gpio_srst_num 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment