1.. _nucleo_f401re_board: 2 3ST Nucleo F401RE 4################ 5 6Overview 7******** 8 9The Nucleo F401RE board features an ARM Cortex-M4 based STM32F401RE MCU 10with a wide range of connectivity support and configurations Here are 11some highlights of the Nucleo F401RE board: 12 13- STM32 microcontroller in QFP64 package 14- Two types of extension resources: 15 16 - Arduino Uno V3 connectivity 17 - ST morpho extension pin headers for full access to all STM32 I/Os 18 19- On-board ST-LINK/V2-1 debugger/programmer with SWD connector 20- Flexible board power supply: 21 22 - USB VBUS or external source(3.3V, 5V, 7 - 12V) 23 - Power management access point 24 25- Three LEDs: USB communication (LD1), user LED (LD2), power LED (LD3) 26- Two push-buttons: USER and RESET 27 28.. image:: img/nucleo_f401re.jpg 29 :align: center 30 :alt: Nucleo F401RE 31 32More information about the board can be found at the `Nucleo F401RE website`_. 33 34Hardware 35******** 36 37Nucleo F401RE provides the following hardware components: 38 39- STM32F401RET6 in LQFP64 package 40- ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU 41- 84 MHz max CPU frequency 42- VDD from 1.7 V to 3.6 V 43- 512 KB Flash 44- 96 KB SRAM 45- GPIO with external interrupt capability 46- 12-bit ADC with 16 channels 47- RTC 48- Advanced-control Timer 49- General Purpose Timers (7) 50- Watchdog Timers (2) 51- USART/UART (3) 52- I2C (3) 53- SPI (4) 54- SDIO 55- USB 2.0 OTG FS 56- DMA Controller 57 58More information about STM32F401RE can be found here: 59 60- `STM32F401RE on www.st.com`_ 61- `STM32F401 reference manual`_ 62 63Supported Features 64================== 65 66The Zephyr nucleo_401re board configuration supports the following hardware features: 67 68+-----------+------------+-------------------------------------+ 69| Interface | Controller | Driver/Component | 70+===========+============+=====================================+ 71| NVIC | on-chip | nested vector interrupt controller | 72+-----------+------------+-------------------------------------+ 73| UART | on-chip | serial port-polling; | 74| | | serial port-interrupt | 75+-----------+------------+-------------------------------------+ 76| PINMUX | on-chip | pinmux | 77+-----------+------------+-------------------------------------+ 78| GPIO | on-chip | gpio | 79+-----------+------------+-------------------------------------+ 80| PWM | on-chip | pwm | 81+-----------+------------+-------------------------------------+ 82| I2C | on-chip | i2c | 83+-----------+------------+-------------------------------------+ 84| ADC | on-chip | ADC Controller | 85+-----------+------------+-------------------------------------+ 86| WATCHDOG | on-chip | System Window Watchdog | 87+-----------+------------+-------------------------------------+ 88| die-temp | on-chip | die temperature sensor | 89+-----------+------------+-------------------------------------+ 90 91Other hardware features are not yet supported on Zephyr porting. 92 93The default configuration can be found in the defconfig file: 94``boards/arm/nucleo_f401re/nucleo_f401re_defconfig`` 95 96 97Pin Mapping 98=========== 99 100Nucleo F401RE Board has 6 GPIO controllers. These controllers are responsible for pin muxing, 101input/output, pull-up, etc. 102 103Available pins: 104--------------- 105.. image:: img/nucleo_f401re_arduino.jpg 106 :align: center 107 :alt: Nucleo F401RE Arduino connectors 108.. image:: img/nucleo_f401re_morpho.jpg 109 :align: center 110 :alt: Nucleo F401RE Morpho connectors 111 112For mode details please refer to `STM32 Nucleo-64 board User Manual`_. 113 114Default Zephyr Peripheral Mapping: 115---------------------------------- 116 117- UART_1 TX/RX : PB6/PB7 118- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com) 119- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) 120- SPI1 CS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI) 121- PWM_2_CH1 : PA0 122- USER_PB : PC13 123- LD2 : PA5 124 125System Clock 126============ 127 128Nucleo F401RE System Clock could be driven by internal or external oscillator, 129as well as main PLL clock. By default System clock is driven by PLL clock at 84MHz, 130driven by 8MHz high speed external clock. 131 132Serial Port 133=========== 134 135Nucleo F401RE board has 3 UARTs. The Zephyr console output is assigned to UART2. 136Default settings are 115200 8N1. 137 138I2C 139=== 140 141Nucleo F401RE board has up to 3 I2Cs. The default I2C mapping for Zephyr is: 142 143- I2C1_SCL : PB8 144- I2C1_SDA : PB9 145 146Programming and Debugging 147************************* 148 149Applications for the ``nucleo_f401re`` board configuration can be built and 150flashed in the usual way (see :ref:`build_an_application` and 151:ref:`application_run` for more details). 152 153Flashing 154======== 155 156Nucleo F401RE board includes an ST-LINK/V2-1 embedded debug tool interface. 157This interface is supported by the openocd version included in Zephyr SDK. 158 159Flashing an application to Nucleo F401RE 160---------------------------------------- 161 162Connect the Nucleo F401RE to your host computer using the USB port, 163then run a serial host program to connect with your Nucleo board: 164 165.. code-block:: console 166 167 $ minicom -D /dev/ttyACM0 168 169Now build and flash an application. Here is an example for 170:ref:`hello_world`. 171 172.. zephyr-app-commands:: 173 :zephyr-app: samples/hello_world 174 :board: nucleo_f401re 175 :goals: build flash 176 177You should see the following message on the console: 178 179.. code-block:: console 180 181 Hello World! arm 182 183 184Debugging 185========= 186 187You can debug an application in the usual way. Here is an example for the 188:ref:`hello_world` application. 189 190.. zephyr-app-commands:: 191 :zephyr-app: samples/hello_world 192 :board: nucleo_f401re 193 :maybe-skip-config: 194 :goals: debug 195 196.. _Nucleo F401RE website: 197 https://www.st.com/en/evaluation-tools/nucleo-f401re.html 198 199.. _STM32 Nucleo-64 board User Manual: 200 https://www.st.com/resource/en/user_manual/dm00105823.pdf 201 202.. _STM32F401RE on www.st.com: 203 https://www.st.com/en/microcontrollers/stm32f401re.html 204 205.. _STM32F401 reference manual: 206 https://www.st.com/resource/en/reference_manual/dm00096844.pdf 207