This is an old revision of the document!


STM32 Value line discovery

stm32vld.jpg

The STM32 Value line discovery is an evaluation board for the ARM Cortex-M3 STM32F100 MCU.

This board has an integrated STLink compatible interface which can be configured to allow the programming of either the board itself or to program an external device.

As with all STM evaluation boards there is lengthy list of restrictions in place regarding what you can and can't do with an evaluation board. See this document.

Pinout

GND  1          STLINKv1 USB         28 GND
NC   2                               27 NC
3V3  3                               26 5V
VBAT 4                               25 PB9
PC13 5                               24 PB8
PC14 6                               23 BOOT
PC15 7                               22 PB7
PD0  8      SWD             CN3      21 PB6
PD1  9  VDD_TARGET x         x       20 PB5
NRST 10 SWCLK      x         x       19 PB4
PC0  11 GND        x         x       18 PB3
PC1  12 SWDIO      x         x       17 PD2
PC2  13                              16 PC12
PC3  14                              15 PC11
PA0  15                              14 PC10
PA1  16                              13 PA15
PA2  17                              12 PA14
PA3  18                              11 PA13
PA4  19 JP1     STM32F100RBT6B       10 PA12
PA5  20 idd                           9 PA11
PA6  21                               8 PA10 RXD
PA7  22                               7 PA9  TXD
PC4  23                               6 PA8
PC5  24                               5 PC9
PB0  25                               4 PC8
PB1  26 PA0                    RST    3 PC7
PB2  27 USER                   RESET  2 PC6
GND  28                               1 GND
      GREEN LED               BLUE LED
      PC9                     PC8
        1    2    3    4    5    6
       PB10 PB11 PB12 PB13 PB14 PB15

CN3 is used to configure either internal or external programming.

LED demo

Install OpenCM3.

Install STLink programmer.

Enter the OpenCM3 fancy blink example's sub-directory and program the chip.

cd /embedded/arm-cortex/src/libopencm3-examples/examples/stm32/f1/stm32vl-discovery/fancyblink/
make PREFIX=/embedded/arm-cortex/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi fancyblink.stlink-flash
 FLASH fancyblink.bin
 INFO src/stlink-common.c: Loading device parameters....
 INFO src/stlink-common.c: Device connected is: F1 Medium/Low-density Value Line device, id 0x10016420
 INFO src/stlink-common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 1024 bytes
 INFO src/stlink-sg.c: Successfully opened a stlink v1 debugger
 INFO src/stlink-common.c: Attempting to write 1224 (0x4c8) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08000400 erased
 INFO src/stlink-common.c: Finished erasing 2 pages of 1024 (0x400) bytes
 INFO src/stlink-common.c: Starting Flash write for VL/F0/F3 core id
 INFO src/stlink-common.c: Successfully loaded flash loader in sram
  1/1 pages written
 INFO src/stlink-common.c: Starting verification of write complete
 INFO src/stlink-common.c: Flash written and verified! jolly good!
STM32Flash

As an alternative to STLink install STM32Flash and program via the serial UART boot loader.

STM32           CP2102
=====           ======
3V3  ---------+
BOOT ---220R--+
PA10 ---------- RX 
PA9  ---------- TX
GND  ---------- GND

Press RESET to enter boot loader mode and use STM32Flash to program and execute the code. Repeat as necessary.

stm32flash -b 115200 -w fancyblink.bin -v -g 0x0 /dev/ttyCP2102
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0420 (Medium-density VL)
- RAM        : 8KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x080004c8 (100.00%) Done.

Starting execution at address 0x08000000... done.

Resources

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information