1.. zephyr:board:: nucleo_f302r8
2
3Overview
4********
5
6The Nucleo F302R8 board features an ARM Cortex-M4 based STM32F302R8
7mixed-signal MCU with FPU and DSP instructions capable of running at 72 MHz.
8Here are some highlights of the Nucleo F302R8 board:
9
10- STM32 microcontroller in LQFP64 package
11- LSE crystal: 32.768 kHz crystal oscillator
12- Two types of extension resources:
13
14  - Arduino* Uno V3 connectors
15  - ST morpho extension pin headers for full access to all STM32 I/Os
16
17- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
18- Flexible board power supply:
19
20  - 5 V from ST-LINK/V2-1 USB VBUS
21  - External power sources: 3.3 V and 7 - 12 V on ST Zio or ST morpho
22    connectors, 5 V on ST morpho connector
23
24- One user LED
25- Two push-buttons: USER and RESET
26
27More information about the board can be found at the `Nucleo F302R8 website`_,
28and in the `STM32 Nucleo-64 board User Manual`_.
29
30Hardware
31********
32
33The Nucleo F302R8 provides the following hardware components:
34
35- STM32F302R8T6 in QFP64 package
36- ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU
37- 72 MHz max CPU frequency
38- VDD from 2.0 V to 3.6 V
39- 64 KB Flash
40- 16 KB SRAM
41- RTC
42- Advanced-control Timer
43- General Purpose Timers (4)
44- Basic Timer
45- Watchdog Timers (2)
46- PWM channels (18)
47- SPI/I2S (2)
48- I2C (3)
49- USART/UART (3/3)
50- USB 2.0 FS with on-chip PHY
51- CAN (2)
52- GPIO with external interrupt capability
53- DMA channels (7)
54- Capacitive sensing channels (18)
55- 12-bit ADC with 15 channels
56- 12-bit D/A converter
57- Analog comparator (3)
58- Op amp
59
60
61More information about the STM32F302R8 can be found here:
62
63- `STM32F302R8 on www.st.com`_
64- `STM32F302R8 reference manual`_
65- `STM32F302R8 datasheet`_
66
67Supported Features
68==================
69
70The Zephyr nucleo_f302r8 board configuration supports the following hardware
71features:
72
73+-----------+------------+-------------------------------------+
74| Interface | Controller | Driver/Component                    |
75+===========+============+=====================================+
76| NVIC      | on-chip    | nested vector interrupt controller  |
77+-----------+------------+-------------------------------------+
78| UART      | on-chip    | serial port-polling;                |
79|           |            | serial port-interrupt               |
80+-----------+------------+-------------------------------------+
81| PINMUX    | on-chip    | pinmux                              |
82+-----------+------------+-------------------------------------+
83| GPIO      | on-chip    | gpio                                |
84+-----------+------------+-------------------------------------+
85| PWM       | on-chip    | pwm                                 |
86+-----------+------------+-------------------------------------+
87| I2C       | on-chip    | i2c                                 |
88+-----------+------------+-------------------------------------+
89| SPI       | on-chip    | spi                                 |
90+-----------+------------+-------------------------------------+
91| ADC       | on-chip    | ADC Controller                      |
92+-----------+------------+-------------------------------------+
93
94Other hardware features are not yet supported on this Zephyr port.
95
96The default configuration can be found in
97:zephyr_file:`boards/st/nucleo_f302r8/nucleo_f302r8_defconfig`
98
99Connections and IOs
100===================
101
102The Nucleo F302R8 Board has 5 GPIO controllers. These controllers are
103responsible for pin muxing, input/output, pull-up, etc.
104
105Board connectors:
106-----------------
107.. image:: img/nucleo_f302r8_connectors.jpg
108   :align: center
109   :alt: Nucleo F302R8 connectors
110
111Default Zephyr Peripheral Mapping:
112----------------------------------
113
114The Nucleo F302R8 board features an Arduino Uno V3 connector and a ST
115morpho connector. Board is configured as follows:
116
117- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com)
118- UART_3 TX/RX : PC10/PC11
119- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
120- SPI2 CS/SCK/MISO/MOSI : PB6/PB13/PB14/P15 (Arduino SPI)
121- PWM_2_CH2 : PA0
122- USER_PB   : PC13
123- LD2       : PB13
124
125System Clock
126------------
127
128The Nucleo F302R8 System Clock can be driven by an internal or
129external oscillator, as well as by the main PLL clock. By default the
130System Clock is driven by the PLL clock at 72 MHz. The input to the
131PLL is an 8 MHz external clock supplied by the processor of the
132on-board ST-LINK/V2-1 debugger/programmer.
133
134Serial Port
135-----------
136
137The Nucleo F302R8 board has 3 UARTs. The Zephyr console output is assigned
138to UART2.  Default settings are 115200 8N1.
139
140
141Programming and Debugging
142*************************
143
144The Nucleo F302R8 board includes an ST-LINK/V2-1 embedded debug tool interface.
145
146Flashing
147========
148
149The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
150so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
151
152Alternatively, OpenOCD or JLink can also be used to flash the board using
153the ``--runner`` (or ``-r``) option:
154
155.. code-block:: console
156
157   $ west flash --runner openocd
158   $ west flash --runner jlink
159
160
161.. _Nucleo F302R8 website:
162   https://www.st.com/en/evaluation-tools/nucleo-f302r8.html
163
164.. _STM32 Nucleo-64 board User Manual:
165   https://www.st.com/resource/en/user_manual/dm00105823.pdf
166
167.. _STM32F302R8 on www.st.com:
168   https://www.st.com/en/microcontrollers/stm32f302r8.html
169
170.. _STM32F302R8 reference manual:
171   https://www.st.com/resource/en/reference_manual/dm00094349.pdf
172
173.. _STM32F302R8 datasheet:
174   https://www.st.com/resource/en/datasheet/stm32f302r8.pdf
175
176.. _STM32CubeProgrammer:
177   https://www.st.com/en/development-tools/stm32cubeprog.html
178