1.. _stm32vl_disco_board: 2 3ST STM32VL Discovery 4#################### 5 6Overview 7******** 8 9The STM32 Discovery series comes in many varieties, in this case the "Value 10Line" STM32F100x SoC series is showcased. Like other Discovery board, an 11integrated ST-LINK debugger and programmer is included (V1), but the only 12included I/O devices are two user LEDs and one user button. 13 14.. image:: img/stm32vl_disco.jpg 15 :align: center 16 :alt: STM32VLDISCOVERY 17 18More information about the board can be found at the `STM32VLDISCOVERY website`_. 19 20Hardware 21******** 22 23The STM32 Discovery board features: 24 25- On-board ST-LINK/V1 with selection mode switch to use the kit as a standalone 26 ST-LINK/V1 (with SWD connector for programming and debugging) 27- Board power supply: through USB bus or from an external 5 V supply voltage 28- External application power supply: 3 V and 5 V 29- Four LEDs: 30 31 - LD1 (red) for 3.3 V power on 32 - LD2 (red/green) for USB communication 33 - LD3 (green) for PC9 output 34 - LD4 (blue) for PC8 output 35- Two push buttons (user and reset) 36- Extension header for all LQFP64 I/Os for quick connection to prototyping board 37 and easy probing 38 39More information about the STM32F100x can be found in the 40`STM32F100x reference manual`_ and the `STM32F100x data sheet`_. 41 42Supported Features 43================== 44 45The Zephyr stm32vl_disco board configuration supports the following hardware features: 46 47.. list-table:: Supported hardware 48 :header-rows: 1 49 50 * - Interface 51 - Controller 52 - Driver/component 53 * - NVIC 54 - on-chip 55 - nested vector interrupt controller 56 * - UART 57 - on-chip 58 - serial port-polling 59 serial port-interrupt 60 * - PINMUX 61 - on-chip 62 - pinmux 63 * - GPIO 64 - on-chip 65 - gpio 66 * - CLOCK 67 - on-chip 68 - reset and clock control 69 * - FLASH 70 - on-chip 71 - flash memory 72 * - WATCHDOG 73 - on-chip 74 - window watchdog 75 * - I2C 76 - on-chip 77 - i2c 78 * - SPI 79 - on-chip 80 - spi 81 * - ADC 82 - on-chip 83 - adc 84 85Other hardware features are not yet supported in this Zephyr port. 86 87The default configuration can be found in the defconfig file: 88``boards/arm/stm32vl_disco/stm32vl_disco_defconfig`` 89 90Connections and IOs 91=================== 92 93Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as 94input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the 95GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current 96capable except for analog inputs. 97 98Default Zephyr Peripheral Mapping: 99---------------------------------- 100 101.. rst-class:: rst-columns 102 103- UART_1_TX : PA9 104- UART_1_RX : PA10 105- UART_2_TX : PA2 106- UART_2_RX : PA3 107- UART_3_TX : PB10 108- UART_3_RX : PB11 109- SPI1_NSS : PA4 110- SPI1_SCK : PA5 111- SPI1_MISO : PA6 112- SPI1_MOSI : PA7 113- SPI2_NSS : PB12 114- SPI2_SCK : PB13 115- SPI2_MISO : PB14 116- SPI2_MOSI : PB15 117- I2C1_SCL : PB6 118- I2C1_SDA : PB7 119- I2C2_SCL : PB10 120- I2C2_SDA : PB11 121 122For mode details please refer to `STM32VLDISCOVERY board User Manual`_. 123 124Programming and Debugging 125************************* 126 127Applications for the ``stm32vl_disco`` board configuration can be built and 128flashed in the usual way (see :ref:`build_an_application` and 129:ref:`application_run` for more details). 130 131Flashing 132======== 133 134STM32VLDISCOVERY board includes an ST-LINK/V1 embedded debug tool interface. 135This interface is supported by the openocd version included in the Zephyr SDK. 136 137Flashing an application 138----------------------- 139 140Here is an example for the :zephyr:code-sample:`blinky` application. 141 142.. zephyr-app-commands:: 143 :zephyr-app: samples/basic/blinky 144 :board: stm32vl_disco 145 :goals: build flash 146 147You will see the LED blinking every second. 148 149Debugging 150========= 151 152You can debug an application in the usual way. Here is an example for the 153:zephyr:code-sample:`blinky` application. 154 155.. zephyr-app-commands:: 156 :zephyr-app: samples/basic/blinky 157 :board: stm32vl_disco 158 :maybe-skip-config: 159 :goals: debug 160 161USB mass storage issues 162======================= 163 164The ST-LINK/V1 includes a buggy USB mass storage gadget. To connect to the 165ST-LINK from Linux, you might need to ignore the device using modprobe 166configuration parameters: 167 168.. code-block:: shell 169 170 $ echo "options usb-storage quirks=483:3744:i" | sudo tee /etc/modprobe.d/local.conf 171 $ sudo modprobe -r usb-storage 172 173References 174********** 175 176.. target-notes:: 177 178.. _STM32VLDISCOVERY website: 179 https://www.st.com/en/evaluation-tools/stm32vldiscovery.html 180 181.. _STM32F100x reference manual: 182 https://www.st.com/resource/en/reference_manual/cd00246267.pdf 183 184.. _STM32F100x data sheet: 185 https://www.st.com/resource/en/datasheet/stm32f100cb.pdf 186 187.. _STM32VLDISCOVERY board User Manual: 188 https://www.st.com/resource/en/user_manual/cd00267113.pdf 189