STM32L Discovery and ULINK2

ST have implemented the JTAG adaptor on the STM32L-DISCOVERY board. It’s very cheap board: ~12€ at farnell_logo.jpg (67×24). Detailed information is available via ST web page. On-board is a STM32L152RBT6 microcontroller featuring 128 KB Flash, 16 KB RAM, 4 KB EEPROM, in an LQFP64 package. On-board ST-Link/V2 is connected to “local” microcontroller. By removing two jumpers ST-LINK could be used to program external microcontroller.

ULINK+STM32L.jpg

ST-Link V2 is excellent tool for the money. It’s great for first “hello world” tests. I tested it with Keil uVision and it works. But that’s just about all. Debugging is very limited. To use all debug features, better debug interface must be used with uVision. I have ULINK2 Debug Adapter. Unfortunately there’s no straightforward connection to DISCOVERY board. Here’s how it can be done:

Take STM32L-DISCOVERY board and turn it upside down. There are several jumpers (solder bridges) marked with SBxxx. Remove SB100, SB101, SB9 and SB13. This will disconnect signals RESET, SWD, SWCLK and SWDIO from ST-Link, respectively:

stlink.jpg

Complete pdf_icon.gif (16×16) STM32L_discovery_schematic

Next, solder tiny wires to open solder bridges. Each solder bridge has arrow shape. Connect wires at proper side of the jumpers, as shown in this schematic: pdf_icon.gif (16×16) ULINK2 STM32L discovery connection.

ULINK2-STM32L-discovery-connection.jpg

Next, solder breadboard with 20 pin header to discovery board and connect wires to proper pins. Take care about IDC pin numbering!

Connect ULINK-2, run uVision, open your favorite STM32L152 project and check the debug window:

uvision.jpg

 

 

Leave a Reply