boards/st/stm32f4_disco/doc/index.rst
.. zephyr:board:: stm32f4_disco
Overview
The STM32F4DISCOVERY Discovery kit features an ARM Cortex-M4 based STM32F407VG MCU with a wide range of connectivity support and configurations Here are some highlights of the STM32F4DISCOVERY board:
STM32 microcontroller in LQFP100 package
Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing
On-board ST-LINK/V2 debugger/programmer with SWD connector
Flexible board power supply:
Eight LEDs:
Two push-buttons: USER and RESET
USB OTG FS with micro-AB connector
LIS302DL or LIS3DSH ST MEMS 3-axis accelerometer
MP45DT02 ST-MEMS audio sensor omni-directional digital microphone
CS43L22 audio DAC with integrated class D speaker driver
More information about the board can be found at the STM32F4DISCOVERY website_.
Hardware
STM32F4DISCOVERY Discovery kit provides the following hardware components:
More information about STM32F407VG can be found here:
STM32F407VG on www.st.com_STM32F407 reference manual_.. zephyr:board-supported-hw::
.. note:: CAN feature requires CAN transceiver, such as SK Pang CAN breakout board_.
Zephyr default configuration uses CAN_2 exclusively, as simultaneous use
of CAN_1 and CAN_2 is not yet supported.
STM32F4DISCOVERY Discovery kit has 8 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.
For more details please refer to STM32F4DISCOVERY board User Manual_.
.. rst-class:: rst-columns
STM32F4DISCOVERY System Clock could be driven by internal or external oscillator, as well as main PLL clock. By default System clock is driven by PLL clock at 168MHz, driven by 8MHz high speed external clock.
STM32F4DISCOVERY Discovery kit has up to 6 UARTs. The Zephyr console output is assigned to UART2. Default settings are 115200 8N1. Please note that ST-Link Virtual Com Port is not wired to chip serial port. In order to enable console output you should use a serial cable and connect it to UART2 pins (PA2/PA3).
Programming and Debugging
.. zephyr:board-supported-runners::
STM32F4DISCOVERY Discovery kit includes an ST-LINK/V2 embedded debug tool interface.
Applications for the stm32f4_disco board configuration can be built and
flashed in the usual way (see :ref:build_an_application and
:ref:application_run for more details).
The board is configured to be flashed using west STM32CubeProgrammer_ runner,
so its :ref:installation <stm32cubeprog-flash-host-tools> is required.
Alternatively, OpenOCD or JLink can also be used to flash the board using
the --runner (or -r) option:
.. code-block:: console
$ west flash --runner openocd $ west flash --runner jlink
Here is an example for the :zephyr:code-sample:blinky application.
Run a serial host program to connect with your board:
.. code-block:: console
$ minicom -D /dev/ttyACM0
Build and flash the application:
.. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: stm32f4_disco :goals: build flash
You should see user led "LD4" blinking.
You can debug an application in the usual way. Here is an example for the
:zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f4_disco :maybe-skip-config: :goals: debug
.. _STM32F4DISCOVERY website: https://www.st.com/en/evaluation-tools/stm32f4discovery.html
.. _STM32F4DISCOVERY board User Manual: https://www.st.com/resource/en/user_manual/dm00039084.pdf
.. _STM32F407VG on www.st.com: https://www.st.com/en/microcontrollers/stm32f407vg.html
.. _STM32F407 reference manual: https://www.st.com/resource/en/reference_manual/dm00031020.pdf
.. _SK Pang CAN breakout board: https://www.skpang.co.uk/products/can-bus-can-fd-breakout-board-5v-supply-and-3-3v-logic
.. _STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html