1.. _steval_fcu001v1: 2 3ST STM32 Flight Controller Unit 4############################### 5 6Overview 7******** 8 9The STEVAL-FCU001V1 is a Cortex M4 MCU-based flight controller unit for toy quad-copter drones. 10 11.. figure:: img/steval_fcu001v1.jpg 12 :width: 753px 13 :align: center 14 :height: 699px 15 :alt: STM32 Flight Controller Unit 16 17Hardware 18******** 19 20STM32 Flight Controller Unit provides the following hardware components: 21 22- STM32F401CC in UFQFPN48 package 23- ARM |reg| 32-bit Cortex |reg|-M4 MCU with FPU 24- 84MHz max MCU frequency 25- VDD from 1.7 V to 3.6 V 26- 256 KB FLASH 27- 64 KB SRAM 28- General Purpose Timers 29- Watchdog Timers (2) 30- On board sensors: 31 32 - 3D Accelerometer and 3D Gyroscope: LSM6DSL 33 - 3D Magnetometer: LIS2MDL 34 - MEMS Pressure sensor: LPS22HD 35 36- 2 User LEDS 37- USART/UART (1) 38- I2C (1) 39- Bluetooth LE over SPI 40 41More information about the STM32 Flight Controller Unit 42can be found in these documents: 43 44- `STEVAL_FCU001V1 website`_ 45- `STM32F401 reference manual`_ 46- `STM32F401CC on www.st.com`_ 47 48Supported Features 49================== 50 51The Zephyr steval_fcu001v1 board configuration supports the following hardware features: 52 53+-----------+------------+------------------------------------+ 54| Interface | Controller | Driver/Component | 55+===========+============+====================================+ 56| NVIC | on-chip | nested vector interrupt controller | 57+-----------+------------+------------------------------------+ 58| UART | on-chip | serial port-polling; | 59| | | serial port-interrupt | 60+-----------+------------+------------------------------------+ 61| PINMUX | on-chip | pinmux | 62+-----------+------------+------------------------------------+ 63| GPIO | on-chip | gpio | 64+-----------+------------+------------------------------------+ 65| PWM | on-chip | pwm | 66+-----------+------------+------------------------------------+ 67| I2C | on-chip | i2c | 68+-----------+------------+------------------------------------+ 69 70 71The default configuration can be found in the defconfig file: 72``boards/arm/steval_fcu001v1/steval_fcu001v1_defconfig`` 73 74Default Zephyr Peripheral Mapping: 75---------------------------------- 76 77- UART_1 TX/RX : PA9/PA10 78- I2C2 SCL/SDA : PB10/PB3 79- PWM_2_CH1 : PA0 80- LD1 : PB5 81- LD2 : PB4 82 83System Clock 84============ 85 86The steval_fcu001v1 system clock can be driven by an internal or external oscillator, 87as well as by the main PLL clock. By default, the system clock is driven by the PLL clock at 84MHz, 88driven by a 16MHz high-speed external clock. 89 90Serial Port 91=========== 92 93The steval_fcu001v1 board has one UART. The Zephyr console output is assigned to UART1. 94Default settings are 115200 8N1. 95 96I2C 97=== 98 99The steval_fcu001v1 board has one I2C. The default I2C mapping for Zephyr is: 100 101- I2C2_SCL : PB10 102- I2C2_SDA : PB3 103 104Programming and Debugging 105************************* 106 107Applications for the ``steval_fcu001v1`` board configuration can be built and 108flashed in the usual way (see :ref:`build_an_application` and 109:ref:`application_run` for more details). 110 111Flashing 112======== 113 114Flashing Zephyr onto the steval_fcu001v1 board requires an external ST-LINK/V2-1 programmer. 115The programmer is attached to the P8 programming header with ARM-JTAG-20-10-Plug-in Adapter. 116 117Flashing an application to STEVAL_FCU001V1 118------------------------------------------ 119 120Connect the FT232-to-USB port to host system, and RX, TX, Gnd pins to 121the P7 header of the steval_fcu001v1 board. Then run a serial host 122program to connect with your steval_fcu001v1 via the FT232 board: 123 124.. code-block:: console 125 126 $ minicom -D /dev/ttyUSB0 127 128Now build and flash an application. Here is an example for :ref:`hello_world` 129 130.. zephyr-app-commands:: 131 :zephyr-app: samples/hello_world 132 :board: steval_fcu001v1 133 :goals: build flash 134 135You should see the following message on the console: 136 137.. code-block:: console 138 139 Hello World! steval_fcu001v1 140 141Debugging 142========= 143 144You can debug an application in the usual way. Here is an example for the 145:ref:`hello_world` application. 146 147.. zephyr-app-commands:: 148 :zephyr-app: samples/hello_world 149 :board: steval_fcu001v1 150 :maybe-skip-config: 151 :goals: debug 152 153.. _STEVAL_FCU001V1 website: 154 https://www.st.com/en/evaluation-tools/steval-fcu001v1.html 155 156.. _STM32F401CC on www.st.com: 157 https://www.st.com/en/microcontrollers-microprocessors/stm32f401cc.html 158 159.. _STM32F401 reference manual: 160 http://www.st.com/resource/en/reference_manual/dm00096844.pdf 161