1.. zephyr:board:: stm32f401_mini
2
3Overview
4********
5
6The STM32 Mini F401 is an extremely low cost and bare-bones
7development board featuring the STM32F401CC, see `STM32F401CC website`_.
8More info about the board with schematics available `here <stm32-base-board-page_>`_
9
10Hardware
11********
12
13The STM32F401CC based board provides the following
14hardware components:
15
16- STM32F401CCU6 in UFQFPN48 package
17- ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU
18- 84 MHz max CPU frequency
19- VDD from 1.7 V to 3.6 V
20- 256 KB Flash
21- 64 KB SRAM
22- GPIO with external interrupt capability
23- 1x12-bit, 2.4 MSPS ADC with 16 channels
24- DMA Controller
25- Up to 11 Timers (six 16-bit, two 32-bit, two watchdog timers and a SysTick timer)
26- USART/UART (3)
27- I2C (3)
28- SPI/I2S (4)
29- SDIO
30- USB 2.0 full-speed device/host/OTG controller with on-chip PHY
31- CRC calculation unit
32- 96-bit unique ID
33- RTC
34
35Supported Features
36==================
37
38.. zephyr:board-supported-hw::
39
40Default Zephyr Peripheral Mapping:
41----------------------------------
42
43- UART_1 TX/RX : PA9/PA10
44- I2C1 SCL/SDA : PB8/PB9
45- SPI1 CS/SCK/MISO/MOSI : PA4/PA5/PA6/PA7
46- PWM_4_CH1 : PB6
47- PWM_4_CH2 : PB7
48- ADC_1 : PA1
49- SW0 : PB2 (routed to BOOT1 dip switch)
50- LED0 : PC13
51
52Clock Sources
53-------------
54
55The board has two external oscillators. The frequency of the slow clock (LSE) is
5632.768 kHz. The frequency of the main clock (HSE) is 25 MHz.
57
58The default configuration sources the system clock from the PLL, which is
59derived from HSE, and is set at 84MHz.
60
61Programming and Debugging
62*************************
63
64.. zephyr:board-supported-runners::
65
66There are 2 main entry points for flashing STM32F4X SoCs, one using the ROM
67bootloader, and another by using the SWD debug port (which requires additional
68hardware). Flashing using the ROM bootloader requires a special activation
69pattern, which can be triggered by using the BOOT0 pin, which on this board
70is a dip switch.
71
72Flashing
73========
74
75Installing dfu-util
76-------------------
77
78It is recommended to use at least v0.8 of `dfu-util`_. The package available in
79debian/ubuntu can be quite old, so you might have to build dfu-util from source.
80
81There is also a Windows version which works, but you may have to install the
82right USB drivers with a tool like `Zadig`_.
83
84Flashing an Application
85-----------------------
86
87Connect a USB-C cable and the board should power ON. Force the board into DFU mode
88by setting the BOOT0 dip switch position to ON. Reset the board with the NRST button.
89
90The dfu-util runner is supported on this board and so a sample can be built and
91tested easily.
92
93.. zephyr-app-commands::
94   :zephyr-app: samples/basic/blinky
95   :board: stm32f401_mini
96   :goals: build flash
97
98Debugging
99=========
100
101The board can be debugged by installing the included 100 mil (0.1 inch) header,
102and attaching an SWD debugger to the 3V3 (3.3V), GND, SCK, and DIO
103pins on that header.
104
105References
106**********
107
108.. target-notes::
109
110.. _Zadig:
111   https://zadig.akeo.ie/
112
113.. _stm32-base-board-page:
114   https://stm32-base.org/boards/STM32F401CCU6-STM32-Mini-F401
115
116.. _dfu-util:
117   http://dfu-util.sourceforge.net/build.html
118
119.. _STM32F401CC website:
120   https://www.st.com/en/microcontrollers-microprocessors/stm32f401cc.html
121