1.. zephyr:board:: stm32f0_disco 2 3Overview 4******** 5 6The STM32F0 Discovery development board uses an STM32F051R8T6 MCU and 7integrates the ST-LINK/V2-1 debugger and programmer. It also comes with a 8comprehensive STM32 software HAL library and various packaged software 9examples. 10 11More information about the board can be found at the `STM32F0DISCOVERY website`_. 12 13Hardware 14******** 15 16The STM32 Discovery board features: 17 18- STM32F051R8T6 microcontroller featuring 64 KB Flash memory, 8 KB RAM in an 19 LQFP64 package 20- On-board ST-LINK/V2 with selection mode switch to use the kit as a standalone 21 ST-LINK/V2 (with SWD connector for programming and debugging) 22- Board power supply: through USB bus or from an external 5 V supply voltage 23- External application power supply: 3 V and 5 V 24- Four LEDs: 25 26 - LD1 (red) for 3.3 V power on 27 - LD2 (red/green) for USB communication 28 - LD3 (green) for PC9 output 29 - LD4 (blue) for PC8 output 30- Two push buttons (user and reset) 31- Extension header for all LQFP64 I/Os for quick connection to prototyping board 32 and easy probing 33- An additional board is provided which can be connected to the extension 34 connector for even easier prototyping and probing. 35- Comprehensive free software including a variety of examples, part of 36 STM32CubeF0 package or STSW-STM32049 for legacy Standard Libraries usage 37 38More information about STM32F051R8 can be found in the `STM32F0x8 reference manual`_. 39 40Supported Features 41================== 42 43The Zephyr stm32f0_disco board configuration supports the following hardware features: 44 45+-----------+------------+-------------------------------------+ 46| Interface | Controller | Driver/Component | 47+===========+============+=====================================+ 48| NVIC | on-chip | nested vector interrupt controller | 49+-----------+------------+-------------------------------------+ 50| UART | on-chip | serial port-polling; | 51| | | serial port-interrupt | 52+-----------+------------+-------------------------------------+ 53| PINMUX | on-chip | pinmux | 54+-----------+------------+-------------------------------------+ 55| GPIO | on-chip | gpio | 56+-----------+------------+-------------------------------------+ 57| CLOCK | on-chip | reset and clock control | 58+-----------+------------+-------------------------------------+ 59| FLASH | on-chip | flash memory | 60+-----------+------------+-------------------------------------+ 61| WATCHDOG | on-chip | independent watchdog | 62+-----------+------------+-------------------------------------+ 63 64Other hardware features are not yet supported in this Zephyr port. 65 66The default configuration can be found in 67:zephyr_file:`boards/st/stm32f0_disco/stm32f0_disco_defconfig` 68 69Connections and IOs 70=================== 71 72Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as 73input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the 74GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current 75capable except for analog inputs. 76 77Default Zephyr Peripheral Mapping: 78---------------------------------- 79 80- UART_1_TX : PA9 81- UART_1_RX : PA10 82- UART_2_TX : PA2 83- UART_2_RX : PA3 84 85For more details please refer to `STM32F0DISCOVERY board User Manual`_. 86 87Programming and Debugging 88************************* 89 90STM32F0DISCOVERY board includes an ST-LINK/V2-1 embedded debug tool interface. 91 92Applications for the ``stm32f0_disco`` board configuration can be built and 93flashed in the usual way (see :ref:`build_an_application` and 94:ref:`application_run` for more details). 95 96Flashing 97======== 98 99The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 100so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 101 102Alternatively, OpenOCD or JLink can also be used to flash the board using 103the ``--runner`` (or ``-r``) option: 104 105.. code-block:: console 106 107 $ west flash --runner openocd 108 $ west flash --runner jlink 109 110Flashing an application to Nucleo F030R8 111---------------------------------------- 112 113Here is an example for the :zephyr:code-sample:`blinky` application. 114 115.. zephyr-app-commands:: 116 :zephyr-app: samples/basic/blinky 117 :board: stm32f0_disco 118 :goals: build flash 119 120You will see the LED blinking every second. 121 122Debugging 123========= 124 125You can debug an application in the usual way. Here is an example for the 126:zephyr:code-sample:`blinky` application. 127 128.. zephyr-app-commands:: 129 :zephyr-app: samples/basic/blinky 130 :board: stm32f0_disco 131 :maybe-skip-config: 132 :goals: debug 133 134References 135********** 136 137.. target-notes:: 138 139.. _STM32F0DISCOVERY website: 140 https://www.st.com/en/evaluation-tools/stm32f0discovery.html 141 142.. _STM32F0x8 reference manual: 143 https://www.st.com/resource/en/reference_manual/dm00031936.pdf 144 145.. _STM32F0DISCOVERY board User Manual: 146 https://www.st.com/resource/en/user_manual/dm00050135.pdf 147 148.. _STM32CubeProgrammer: 149 https://www.st.com/en/development-tools/stm32cubeprog.html 150