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