1.. zephyr:board:: nucleo_f091rc
2
3Overview
4********
5The STM32 Nucleo-64 development board with STM32F091RC MCU, supports Arduino and ST morpho connectivity.
6
7The STM32 Nucleo board provides an affordable, and flexible way for users to try out new concepts,
8and build prototypes with the STM32 microcontroller, choosing from the various
9combinations of performance, power consumption, and features.
10
11The Arduino* Uno V3 connectivity support and the ST morpho headers allow easy functionality
12expansion of the STM32 Nucleo open development platform with a wide choice of
13specialized shields.
14
15The STM32 Nucleo board integrates the ST-LINK/V2-1 debugger and programmer.
16
17The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together
18with various packaged software examples.
19
20More information about the board can be found at the `Nucleo F091RC website`_.
21
22Hardware
23********
24Nucleo F091RC provides the following hardware components:
25
26- STM32 microcontroller in QFP64 package
27- Two types of extension resources:
28
29  - Arduino* Uno V3 connectivity
30  - ST morpho extension pin headers for full access to all STM32 I/Os
31
32- ARM* mbed*
33- On-board ST-LINK/V2-1 debugger/programmer with SWD connector:
34
35  - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1
36
37- Flexible board power supply:
38
39  - USB VBUS or external source (3.3V, 5V, 7 - 12V)
40  - Power management access point
41
42- Three LEDs:
43
44  - USB communication (LD1), user LED (LD2), power LED (LD3)
45
46- Two push-buttons: USER and RESET
47- USB re-enumeration capability. Three different interfaces supported on USB:
48
49  - Virtual COM port
50  - Mass storage
51  - Debug port
52
53- Support of wide choice of Integrated Development Environments (IDEs) including:
54
55  - IAR
56  - ARM Keil
57  - GCC-based IDEs
58
59More information about STM32F091RC can be found in the
60`STM32F091 reference manual`_
61
62
63Supported Features
64==================
65
66The Zephyr nucleo_f091rc 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| CLOCK     | on-chip    | reset and clock control             |
81+-----------+------------+-------------------------------------+
82| FLASH     | on-chip    | flash memory                        |
83+-----------+------------+-------------------------------------+
84| WATCHDOG  | on-chip    | independent watchdog                |
85+-----------+------------+-------------------------------------+
86| PWM       | on-chip    | pwm                                 |
87+-----------+------------+-------------------------------------+
88| COUNTER   | on-chip    | rtc                                 |
89+-----------+------------+-------------------------------------+
90| I2C       | on-chip    | i2c controller                      |
91+-----------+------------+-------------------------------------+
92| SPI       | on-chip    | SPI controller                      |
93+-----------+------------+-------------------------------------+
94| CAN       | on-chip    | CAN controller                      |
95+-----------+------------+-------------------------------------+
96| ADC       | on-chip    | ADC controller                      |
97+-----------+------------+-------------------------------------+
98| DAC       | on-chip    | DAC controller                      |
99+-----------+------------+-------------------------------------+
100| DMA       | on-chip    | Direct Memory Access                |
101+-----------+------------+-------------------------------------+
102| die-temp  | on-chip    | die temperature sensor              |
103+-----------+------------+-------------------------------------+
104| RTC       | on-chip    | rtc                                 |
105+-----------+------------+-------------------------------------+
106
107Other hardware features are not yet supported in this Zephyr port.
108
109The default configuration can be found in
110:zephyr_file:`boards/st/nucleo_f091rc/nucleo_f091rc_defconfig`
111
112Connections and IOs
113===================
114
115Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
116input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
117GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
118capable except for analog inputs.
119
120Board connectors:
121-----------------
122.. image:: img/nucleo_f091rc_connectors.jpg
123   :align: center
124   :alt: Nucleo F091RC connectors
125
126Default Zephyr Peripheral Mapping:
127----------------------------------
128
129- UART_1 TX/RX : PB6/PB7
130- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual COM Port)
131- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
132- I2C2 SCL/SDA : PA11/PA12 (disabled by default, uses same pins as CAN)
133- CAN RX/TX : PA11/PA12
134- SPI1 SCK/MISO/MOSI : PA5/PA6/PA7 (Arduino SPI)
135- SPI2 SCK/MISO/MOSI : PB13/PB14/PB15
136- USER_PB : PC13
137- LD2 : PA5
138- DAC_OUT1 : PA4
139- PWM_2_CH1 : PA5 (might conflict with SPI1)
140
141For more details please refer to `STM32 Nucleo-64 board User Manual`_.
142
143Programming and Debugging
144*************************
145
146Nucleo F091RC board includes an ST-LINK/V2-1 embedded debug tool interface.
147
148Applications for the ``nucleo_f091rc`` board configuration can be built and
149flashed in the usual way (see :ref:`build_an_application` and
150:ref:`application_run` for more details).
151
152Flashing
153========
154
155The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
156so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
157
158Alternatively, OpenOCD or JLink can also be used to flash the board using
159the ``--runner`` (or ``-r``) option:
160
161.. code-block:: console
162
163   $ west flash --runner openocd
164   $ west flash --runner jlink
165
166Flashing an application to Nucleo F091RC
167----------------------------------------
168
169Here is an example for the :zephyr:code-sample:`blinky` application.
170
171.. zephyr-app-commands::
172   :zephyr-app: samples/basic/blinky
173   :board: nucleo_f091rc
174   :goals: build flash
175
176You will see the LED blinking every second.
177
178Debugging
179=========
180
181You can debug an application in the usual way.  Here is an example for the
182:zephyr:code-sample:`hello_world` application.
183
184.. zephyr-app-commands::
185   :zephyr-app: samples/hello_world
186   :board: nucleo_f091rc
187   :maybe-skip-config:
188   :goals: debug
189
190References
191**********
192
193.. target-notes::
194
195.. _Nucleo F091RC website:
196   https://www.st.com/en/evaluation-tools/nucleo-f091rc.html
197
198.. _STM32F091 reference manual:
199   https://www.st.com/resource/en/reference_manual/dm00031936.pdf
200
201.. _STM32 Nucleo-64 board User Manual:
202   https://www.st.com/resource/en/user_manual/dm00105823.pdf
203
204.. _STM32CubeProgrammer:
205   https://www.st.com/en/development-tools/stm32cubeprog.html
206