A simple DLP-USB1232H based JTAG programmer with OpenOCD support

DLP-USB1232H and OpenOCD based JTAG adapter

Here's a quick introduction to using a cheap FTDI FT2232H based module (left-hand side on the photo) as a JTAG programmer together with the OpenOCD JTAG software for ARM and MIPS devices. The module I am using for thіs purpose is a DLP Design DLP-USB1232H, which is available from various sources (Digikey, Mouser, Saelig, and probably others) for 20-30 bucks plus shipping, depending on where you live.

By properly connecting the correct pins of the DLP-USB1232H to the target JTAG
device (I used an Olimex STM32-H103 eval board for testing) you can easily abuse the DLP-USB1232H as JTAG programmer. As I chose the proper DLP-USB1232H GPIOs for the TRST and (S)RST pins, OpenOCD even worked out of the box, without having to change a single line of code.

The only thing that's required is to provide OpenOCD with an interface config file that uses the usbjtag "layout". I have already submitted that config file upstream, I guess it should be merged soonish.

The usage is then pretty simple:

  $ openocd -f interface/dlp-usb1232h.cfg -f board/olimex_stm32_h103.cfg

And in another xterm:

  $ telnet localhost 4444
  > init
  > reset halt
  > flash write_image erase fancyblink.bin 0x08000000
  > reset

This flashes the given fancyblink.bin image onto the STM32-H103 eval board via the DLP-USB1232H JTAG programmer, where fancyblink.bin is an example program from my libopenstm32 project (that aims to create a full-blown firmware library for ST STM32 microcontrollers, similar to what avr-libc does for AVRs). Contributions for libopenstm32 (license is GPLv3 or later) are highly welcome btw., hint hint...

  $ git clone git://libopenstm32.git.sourceforge.net/gitroot/libopenstm32/libopenstm32

Full schematics, datasheets, and detailed instructions for the JTAG programmer are available from a small page I created in my Random Projects wiki, which is intended for the various smaller projects I'm working on that don't warrant getting their own domain, wiki, etc:

The Random Projects wiki is open-for-all btw, feel free to use it for any freeish, software or hardware projects of your own if you want.

Anyway, the DLP-USB1232H is a really nice device as it can also be used for many other purposes, such as USB-to-Serial or SPI BIOS chip programming, but more on that in another blog post...

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Adaptive clocking?

Hi, many thanks for sharing this information, it looks like a very cheap way to get a good JTAG solution under OpenOCD.

I've read that more and more FT2232H JTAG adapters are appearing which now support RCLK (or TRCLK) adaptive clocking. Do you think that the DLP-USB1232H would be able to support this since it has the same chip? Or maybe with some kind of extension module....?

Where have you bought it?

Mouser is charging 20EUR for the shipping.

Saelig charges 50USD to Europe.

I am trying now Digikey to see how much they charge.

From which shop have you ordered it?

Shipping costs

I think I got mine from Digikey. And yes, shipping costs and taxes etc. are not so nice, unfortunately.

Nice howto How can I connect

Nice howto
How can I connect this DLP-USB1232H to a 1.8v target?

1.8V targets

Hm, don't know if that's supposed to work. You'd have to check the datasheets and/or try it. If you find out if it works, please let us know.

Nice Open support

thanks a lot for sharing this information.
really appreciated.
Will visit again soon.
Keep up the good work mate.

Proper Connection

I liked this article a lot. I found the part about properly connecting the pins of the DLP-USB1232H to the target JTAG
device very helpful. Just when I thought everything was broken, turns out it was just a poor connection. Thanks for the solid blog.