Versaloon Dual

Expanding the Versaloon universal programmer platform by adding a second target port


Project motivation

  • There was a special need to flash two microcontrollers located on the same board in one step
  • Available simple programmers (e.g. ST-Link) failed, because I was not able to connect 2 ST-Link to the same PC
  • Some internet searching revealed the Versaloon Platform
  • Versaloon is a full open source platform, so modifying the programmer to my special needs appeared possible
  • Result

    I've made a new schematic and pcb layout, starting from the original VersaloonMini schematic and ending up here: the Versaloon Dual. Most of the schematic was simply copied by its intention, using different but readily available parts. Then I added a simple analog switch to switch the programming pins between two sets of connectors. Each set consists of one standard 20pin ARM JTAG and one STM8 SWIM connector, since these are the devices I intend to use the programmer on.

    I didn't want to hassle around with STM32 bootloaders, so I just added one ARM JTAG connector to flash the onboard STM32.

    Size and pcb prototype cost did not matter, so the resulting pcb is larger than the original VersaloonMini pcb.

    Here's the schematic and board files:

  • Schematic: Schematic (PDF)
  • Schematic: Schematic file (Eagle)
  • Schematic: Board file (Eagle)
  • As you might notice, there's a difference between the photo and the pcb layout: The pictured hardware has one more target connector. This is for a very special use case and therefore not included in the schematics and layout. I'm using a handy probe (Tag-Connect) to connect the Versaloon Dual to the target board.

    Initial testing using the original VersaloonMini firmware showed first success, since the hardware should be compatible. Then I've made some minor modifications to the Versaloon firmware to support the analog switch and external power:

  • Polarity of ext. power control is inverted
  • A GPIO pin of the STM32 is used to control the analog switch
  • Just to avoid compilation of the PC side vsprog (this didn't work using my cygwin installation and I was to lazy to investigate the reasons), I've made the switch control avalailable to the -V "tvcc.set voltage" option of vsprog:

  • vsprog -V "tvcc.set 3301" selects the left hand side port
  • vsprog -V "tvcc.set 3302" selects the right hand side port

  • This is just a quick and dirty hack and should be implemented better, creating a new vsprog script or maybe using the GPIO facitilties of vsprog.

    Another drawback of the particular hardware is the stray capacitance of the analog switch path. It distorts especially open drain signals, as used for SWIM programming, so SWIM and SWD programming work using slower speed mode only (-W 1 option).

    Here's the modified source of the versaloon platform:

  • Tarball based on Versaloon version r1501
  • Patch applyable to svn revision r1501
  • Steps to apply the patch to svn revision r1051
  • Hexfile, compiled from above sources
  • The firmware was compiled using Freddie Chopin's bleeding edge toolchain: Download page. Freddie also offers pre-compiled versions of Openocd and some other interesting things.

    The Versaloon Dual was successfully tested using these targets:

  • STM8 (STM8S105K6) using SWIM
  • STM32 (STM32F103CB) using JTAG and SWD
  • Look here: The STM32 files for my other STM32 related pages.

    Table of contents
      ... und ein Zaehlpixel hab ich auch :-)