Skip to content

Instantly share code, notes, and snippets.

@nazgee
Forked from natevw/notes.md
Created May 21, 2016 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazgee/b35e5cbc01a7c0e4f5f3421796b4d712 to your computer and use it in GitHub Desktop.
Save nazgee/b35e5cbc01a7c0e4f5f3421796b4d712 to your computer and use it in GitHub Desktop.
Using Bus Blaster v4 with STM32F4x SWD

Using Bus Blaster v4 with STM32F4x SWD

For SWD (instead of normal JTAG) you need a different CPLD "buffer logic" image on the Bus Blaster, the KT-Link compatible ones seem like the recommended means.

# with buffer logic at https://github.com/dergraaf/busblaster_v4/blob/master/ktlink/ktlink.svf
# via http://dangerousprototypes.com/forum/viewtopic.php?f=37&t=5954 from https://github.com/mchck/mchck/wiki/Getting-Started#wiki-bus-blaster
curl -O https://github.com/dergraaf/busblaster_v4/raw/master/ktlink/ktlink.svf
openocd -f board/dp_busblaster_v3.cfg -c "adapter_khz 1000; init; svf /Users/natevw/Downloads/ktlink.svf; shutdown"

Then start OpenOCD with the necessary configuration and connect to it:

openocd -f interface/ftdi/dp_busblaster_kt-link.cfg -c 'transport select swd' -f target/stm32f4x.cfg

# via http://openhardware.net/Embedded_ARM/OpenOCD_JTAG/#testocd
telnet 4444
> reg   # should show registers

To program back the JTAG-Key, I think the file you need is https://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Bus_Blaster/buffer_logic/BBv4-JTAGkey-selftest-v1.1.svf, the selftest in the filename is a little weird but accodring to http://dangerousprototypes.com/docs/Bus_Blaster_v2_manufacturing_resources#Hardware_selftest:

The hardware self test is part of the factory jtagkey-compatible buffer shipped with the Bus Blaster v2.

…so maybe that's fine.

Helpful links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment