boards/st/stm32f3_disco/doc/index.rst
.. zephyr:board:: stm32f3_disco
Overview
The STM32F3DISCOVERY Discovery kit features an ARM Cortex-M4 based STM32F303VC MCU with everything required for beginners and experienced users to get started quickly. Here are some highlights of the STM32F3DISCOVERY 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 for PCB version A or B or ST-LINK/V2-B for PCB version C and newer, debugger/programmer with SWD connector
Board power supply: through USB bus or from an external 3 V or 5 V supply voltage
External application power supply: 3 V and 5 V
Ten LEDs:
Two push-buttons: USER and RESET
USB USER with Mini-B connector
L3GD20 or I3G4250D, ST MEMS motion sensor, 3-axis digital output gyroscope
LSM303DLHC or LSM303AGR, ST MEMS system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor;
.. HINT:: Recent PCB revisions (E and newer) are shipped with I3G4250D and LSM303AGR.
More information about the board can be found at the
STM32F3DISCOVERY website_.
Hardware
STM32F3DISCOVERY Discovery kit provides the following hardware components:
More information about STM32F303VC can be found here:
STM32F303VC on www.st.com_STM32F303xC reference manual_.. zephyr:board-supported-hw::
STM32F3DISCOVERY Discovery kit has 6 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.
For more details please refer to STM32F3DISCOVERY board User Manual_.
.. rst-class:: rst-columns
STM32F3DISCOVERY 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 72 MHz, driven by 8 MHz MCO from the ST Link.
STM32F3DISCOVERY Discovery kit has up to 5 UARTs. The Zephyr console output is assigned to UART1. Default settings are 115200 8N1.
STM32F3DISCOVERY has up to 2 I2Cs. I2C1 is connected to the LSM303DLHC and is an ultra-compact low-power system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor.
STM32F3DISCOVERY has a USB 2.0 full-speed device interface available through its mini USB connector (USB USER).
The STM32F3DISCOVERY does not have an onboard CAN transceiver. In
order to use the CAN bus on the this board, an external CAN bus
transceiver must be connected to PD0 (CAN1_RX) and PD1
(CAN1_TX).
Programming and Debugging
.. zephyr:board-supported-runners::
STM32F3DISCOVERY Discovery kit includes a ST-LINK/V2 or ST-LINK/V2-B embedded debug tool interface.
Applications for the stm32f3_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
First, connect the STM32F3DISCOVERY Discovery kit to your host computer using the USB port to prepare it for flashing. Then build and flash your application.
Here is an example for the :zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f3_disco :goals: build flash
In case you are using a recent PCB revision (E or newer), you have to use an adapted board definition:
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f3_disco@E :goals: build flash
Run a serial host program to connect with your board. For PCB version A or B a TTL(3.3V) serial adapter is required. For PCB version C and newer a Virtual Com Port (VCP) is available on the USB ST-LINK port.
.. code-block:: console
$ minicom -D /dev/<tty device>
Replace <tty_device> with the port where the STM32F3DISCOVERY board can be found. For example, under Linux, /dev/ttyUSB0.
You should see the following message on the console:
.. code-block:: console
Hello World! arm
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: stm32f3_disco :goals: debug
Again you have to use the adapted command for newer PCB revisions (E and newer):
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f3_disco@E :goals: debug
.. _STM32F3DISCOVERY website: https://www.st.com/en/evaluation-tools/stm32f3discovery.html
.. _STM32F3DISCOVERY board User Manual: https://www.st.com/resource/en/user_manual/dm00063382.pdf
.. _STM32F303VC on www.st.com: https://www.st.com/en/microcontrollers/stm32f303vc.html
.. _STM32F303xC reference manual: https://www.st.com/resource/en/reference_manual/dm00043574.pdf
.. _STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html