1.. zephyr:board:: stm32f072_eval
2
3Overview
4********
5
6The STM32F072-EVAL Discovery kit features an ARM Cortex-M0 based STM32F072VBT6 MCU
7with a wide range of connectivity support and configurations.
8Here are some highlights of the STM32F072-EVAL board:
9
10- Four 5 V power supply options: power jack, ST-LINK/V2 USB connector, user USB connector, or daughter board
11- Stereo audio jack, which supports a headset with microphone connected to DAC and ADC of STM32F072VBT6.
12- 2G Byte (or more) SPI interface MicroSD card
13- I2C compatible serial interface temperature sensor
14- RF E2PROM
15- RS232 and RS485 communication
16- IrDA transceiver
17- IR LED and IR receiver
18- SWD debug support, ST-LINK/V2 embedded
19- 240x320 TFT color LCD connected to SPI interface of STM32F072VBT6
20- Joystick with 4-direction control and selector
21- Reset and tamper buttons
22- Four color user LEDs and two LEDs as MCU low power alarm
23- Extension connector for daughter board or wrapping board
24- MCU voltage choice: fixed 3.3 V or adjustable from 1.65 V to 3.6 V
25- USB full-speed connector
26- Touch sensing buttons
27- RTC with backup battery
28- CAN2.0A/B compliant connector
29- Light Dependent Resistor (LDR)
30- Potentiometer
31- Two HDMI connectors with DDC and CEC
32- Smart Card slot
33- Motor control connector
34
35Hardware
36********
37
38STM32F072-EVAL Discovery kit provides the following hardware components:
39
40- STM32F072VBT6 in LQFP100 package
41- ARM |reg| 32-bit Cortex |reg| -M0 CPU
42- 48 MHz max CPU frequency
43- VDD from 2.0 V to 3.6 V
44- 128 KB Flash
45- 16 KB SRAM with HW parity
46- GPIO with external interrupt capability
47- one 12-bit ADC with 16 channels
48- one 12-bit D/A converters with 2 channels
49- RTC
50- Advanced-control Timer
51- General Purpose Timers (8)
52- Watchdog Timers (2)
53- USART (4)
54- I2C (2)
55- SPI (2)
56- CAN
57- USB 2.0 OTG FS with on-chip PHY
58- CRC calculation unit
59- DMA Controller
60- HDMI CEC Controller
61- 24 capacitive sensing channels for touchkey, linear, and rotary touch sensors
62- Up to 87 fast I/Os: 68 I/Os with 5V tolerant capability and 19 with independent supply
63
64More information about STM32F072VB can be found here:
65       - `STM32F072VB on www.st.com`_
66       - `STM32F072 reference manual`_
67
68Supported Features
69==================
70
71The Zephyr stm32f072_eval board configuration supports the following hardware features:
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| CLOCK     | on-chip    | reset and clock control             |
88+-----------+------------+-------------------------------------+
89| WATCHDOG  | on-chip    | independent watchdog                |
90+-----------+------------+-------------------------------------+
91
92Other hardware features are not yet supported on this Zephyr porting.
93
94The default configuration can be found in
95:zephyr_file:`boards/st/stm32f072_eval/stm32f072_eval_defconfig`
96
97
98Pin Mapping
99===========
100
101STM32F072-EVAL Discovery kit has 6 GPIO controllers. These controllers are responsible for pin muxing,
102input/output, pull-up, etc.
103
104For more details please refer to STM32F072-EVAL board User Manual.
105
106Default Zephyr Peripheral Mapping:
107----------------------------------
108- UART_2_TX : PD5
109- UART_2_RX : PD6
110- TAMPER_PB : PC13
111- JOYSTICK_RIGHT_PB : PE3
112- JOYSTICK_LEFT_PB : PF2
113- JOYSTICK_UP_PB : PF9
114- JOYSTICK_DOWN_PB : PF10
115- JOYSTICK_SEL_PB : PA0
116- LD1 : PD8
117- LD2 : PD9
118- LD3 : PD10
119- LD4 : PD11
120
121System Clock
122============
123
124STM32F072-EVAL System Clock could be driven by an internal or external oscillator,
125as well as the main PLL clock. By default the System clock is driven by the PLL clock at 48MHz,
126driven by an 8MHz high speed internal clock.
127
128Serial Port
129===========
130
131STM32F072-EVAL Discovery kit has up to 4 UARTs. The Zephyr console output is assigned to UART2.
132Default settings are 115200 8N1.
133
134Programming and Debugging
135*************************
136
137STM32F072-EVAL Discovery kit includes an ST-LINK/V2 embedded debug tool interface.
138
139Applications for the ``stm32f072_eval`` board configuration can be built and
140flashed in the usual way (see :ref:`build_an_application` and
141:ref:`application_run` for more details).
142
143Flashing
144========
145
146The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
147so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
148
149Alternatively, OpenOCD or JLink can also be used to flash the board using
150the ``--runner`` (or ``-r``) option:
151
152.. code-block:: console
153
154   $ west flash --runner openocd
155   $ west flash --runner jlink
156
157Flashing an application to STM32F072-EVAL
158-------------------------------------------
159
160Here is an example for the :zephyr:code-sample:`blinky` application.
161
162.. zephyr-app-commands::
163   :zephyr-app: samples/basic/blinky
164   :board: stm32f072_eval
165   :goals: build flash
166
167You will see the LED blinking every second.
168
169Debugging
170=========
171
172You can debug an application in the usual way.  Here is an example for the
173:zephyr:code-sample:`blinky` application.
174
175.. zephyr-app-commands::
176   :zephyr-app: samples/basic/blinky
177   :board: stm32f072_eval
178   :maybe-skip-config:
179   :goals: debug
180
181
182.. _STM32F072VB on www.st.com:
183   https://www.st.com/en/microcontrollers/stm32f072vb.html
184
185.. _STM32F072 reference manual:
186   https://www.st.com/resource/en/reference_manual/dm00031936.pdf
187
188.. _STM32CubeProgrammer:
189   https://www.st.com/en/development-tools/stm32cubeprog.html
190