1.. zephyr:board:: stm32u083c_dk
2
3Overview
4********
5
6The STM32U083C_DK board, featuring an ARM Cortex-M0+ based STM32U083MC MCU,
7provides an affordable and flexible way for users to try out new concepts and
8build prototypes by choosing from the various combinations of performance and
9power consumption features. Here are some highlights of the STM32U083C_DK
10board:
11
12- Ultra-low-power STM32U083MC microcontroller based on the Arm |reg| Cortex |reg|‑M0+ core,
13  featuring 256 Kbytes of flash memory and 40 Kbytes of SRAM in an LQFP80 package.
14
15- Board connectors:
16
17  - ST-LINK USB Type-C connector
18  - User USB Device with USB Type-C connector
19  - mikroBUS connectors
20  - MIPI debug in connector (Arm |reg| Cortex |reg| 10‑pin 1.27 mm‑pitch
21    debug connector over STDC14 footprint)
22  - Extension connectors for full access to all STM32 I/Os
23  - VBAT dedicated connector provides the capability to power the board on a battery
24
25- Flexible power-supply options:
26
27  - ST-LINK USB VBUS, USB connector, or external sources
28
29- 4×24-segment LCD
30- Three user LEDs
31- Reset push-button
32- User joystick
33- Touchkey
34- Temperature sensor
35
36More information about the board can be found at the `STM32U083_DK website`_.
37
38Hardware
39********
40
41The STM32U083xC devices are an ultra-low-power microcontrollers family (STM32U0
42Series) based on the high-performance Arm |reg| Cortex |reg|-M0+ 32-bit RISC core.
43They operate at a frequency of up to 56 MHz.
44
45- Includes ST state-of-the-art patented technology
46- Ultra-low-power with FlexPowerControl:
47
48  - 1.71 V to 3.6 V power supply
49  - -40 °C to +85/125 °C temperature range
50  - 130 nA VBAT mode: supply for RTC, 9 x 32-bit backup registers
51  - 16 nA Shutdown mode (6 wake-up pins)
52  - 30 nA Standby mode (6 wake-up pins) without RTC
53  - 160 nA Standby mode with RTC
54  - 825 nA Stop 2 mode with RTC
55  - 695 nA Stop 2 mode without RTC
56  - 4 µA wake-up from Stop mode
57  - 52 µA/MHz Run mode (LDO mode)
58  - Brownout reset
59
60- Core:
61
62  - 32-bit Arm |reg| Cortex |reg|-M0+ CPU, frequency up to 56 MHz
63
64- ART Accelerator:
65
66  - 1-Kbyte instruction cache allowing 0-wait-state execution from flash memory
67
68- Benchmarks:
69
70  - 1.13 DMIPS/MHz (Drystone 2.1)
71  - 134 CoreMark |reg| (2.4 CoreMark/MHz at 56 MHz)
72  - 407 ULPMark™-CP
73  - 143 ULPMark™-PP
74  - 19.7 ULPMark™-CM
75
76- Memories:
77
78  - 256-Kbyte single bank flash memory, proprietary code readout protection
79  - 40-Kbyte SRAM with hardware parity check
80
81- General-purpose input/outputs:
82
83  - Up to 69 fast I/Os, most of them 5 V‑tolerant
84
85- Clock management:
86
87  - 4 to 48 MHz crystal oscillator
88  - 32 kHz crystal oscillator for RTC (LSE)
89  - Internal 16 MHz factory-trimmed RC (±1%)
90  - Internal low-power 32 kHz RC (±5%)
91  - Internal multispeed 100 kHz to 48 MHz oscillator,
92    auto-trimmed by LSE (better than ±0.25 % accuracy)
93  - Internal 48 MHz with clock recovery
94  - PLL for system clock, USB, ADC
95
96- Security:
97
98  - Customer code protection
99  - Robust read out protection (RDP): 3 protection level states
100    and password-based regression (128-bit PSWD)
101  - Hardware protection feature (HDP)
102  - Secure boot
103  - AES: 128/256-bit key encryption hardware accelerator
104  - True random number generation, candidate for NIST SP 800-90B certification
105  - Candidate for Arm |reg| PSA level 1 and SESIP level 3 certifications
106  - 5 passive anti-tamper pins
107  - 96-bit unique ID
108
109- Up to 10 timers, 2 watchdogs and RTC:
110
111  - 1x 16-bit advanced motor-control, 1x 32-bit and 3x 16-bit general purpose,
112    2x 16-bit basic, 3x low-power 16-bit timers (available in Stop mode),
113    2x watchdogs, SysTick timer
114  - RTC with hardware calendar, alarms and calibration
115
116- Up to 20 communication peripherals:
117
118  - 1 USB 2.0 full-speed crystal-less solution with LPM and BCD
119  - 7 USARTs/LPUARTs (SPI, ISO 7816, LIN, IrDA, modem)
120  - 4 I2C interfaces supporting Fast-mode and Fast-mode Plus (up to 1 Mbit/s)
121  - 3 SPIs, plus 4x USARTs in SPI mode
122  - IRTIM (Infrared interface)
123
124- Rich analog peripherals (independent supply):
125
126  - 1x 12-bit ADC (0.4 µs conversion time), up to 16-bit with hardware oversampling
127  - 1x 12-bit DAC output channel, low-power sample and hold
128  - 1x general-purpose operational amplifier with built-in PGA (variable gain up to 16)
129  - 2x ultra-low-power comparators
130
131- LCD driver:
132  - 8*48 or 4*52 segments, with step-up converter
133
134- General-purpose inputs/outputs:
135  - Up to 69 fast I/Os, most of them 5 V-tolerant
136
137- ECOPACK2 compliant packages
138
139More information about STM32U083MC can be found here:
140
141- `STM32U083MC on www.st.com`_
142- `STM32U083 reference manual`_
143
144Supported Features
145==================
146
147The Zephyr stm32u083c_dk board configuration supports the following hardware features:
148
149+-----------+------------+-------------------------------------+
150| Interface | Controller | Driver/Component                    |
151+===========+============+=====================================+
152| CLOCK     | on-chip    | reset and clock control             |
153+-----------+------------+-------------------------------------+
154| GPIO      | on-chip    | gpio                                |
155+-----------+------------+-------------------------------------+
156| NVIC      | on-chip    | nested vector interrupt controller  |
157+-----------+------------+-------------------------------------+
158| UART      | on-chip    | serial port-polling;                |
159|           |            | serial port-interrupt               |
160+-----------+------------+-------------------------------------+
161| ADC       | on-chip    | adc                                 |
162+-----------+------------+-------------------------------------+
163| DAC       | on-chip    | DAC Controller                      |
164+-----------+------------+-------------------------------------+
165| I2C       | on-chip    | i2c                                 |
166+-----------+------------+-------------------------------------+
167| PWM       | on-chip    | pwm                                 |
168+-----------+------------+-------------------------------------+
169
170Other hardware features are not yet supported on this Zephyr port.
171
172The default configuration can be found in the defconfig file:
173:zephyr_file:`boards/st/stm32u083c_dk/stm32u083c_dk_defconfig`
174
175
176Connections and IOs
177===================
178
179STM32U083C_DK Board has 10 GPIO controllers. These controllers are responsible
180for pin muxing, input/output, pull-up, etc.
181
182For more details please refer to `STM32U083MC User Manual`_.
183
184Default Zephyr Peripheral Mapping:
185----------------------------------
186
187- ADC1_IN8 : PA4
188- I2C1_SCL : PB8
189- I2C1_SDA : PB9
190- LPUART_1_TX : PG7
191- LPUART_1_RX : PG8
192- SPI1_NSS : PA4
193- SPI1_SCK : PA5
194- SPI1_MISO : PA6
195- SPI1_MOSI : PA7
196- SPI1_CS : PA15
197- UART_2_TX : PA2
198- UART_2_RX : PA3
199
200System Clock
201------------
202
203STM32U083C_DK System Clock could be driven by internal or external oscillator,
204as well as main PLL clock. By default System clock is driven by PLL clock at
20548MHz, driven by 4MHz medium speed internal oscillator.
206
207Serial Port
208-----------
209
210STM32U083C_DK board has 7 U(S)ARTs. The Zephyr console output is assigned to
211USART2. Default settings are 115200 8N1.
212
213
214Programming and Debugging
215*************************
216
217STM32U083C_DK board includes an ST-LINK/V3 embedded debug tool interface.
218This probe allows to flash the board using various tools.
219
220Flashing
221========
222
223The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
224so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
225
226Alternatively, JLink or pyOCD can also be used to flash the board using
227the ``--runner`` (or ``-r``) option:
228
229.. code-block:: console
230
231   $ west flash --runner pyocd
232   $ west flash --runner jlink
233
234For pyOCD, additional target information needs to be installed.
235This can be done by executing the following commands.
236
237.. code-block:: console
238
239   $ pyocd pack --update
240   $ pyocd pack --install stm32u0
241
242
243Flashing an application to STM32U083C_DK
244----------------------------------------
245
246Connect the STM32U083C_DK to your host computer using the USB port.
247Then build and flash an application. Here is an example for the
248:zephyr:code-sample:`hello_world` application.
249
250Run a serial host program to connect with your Nucleo board:
251
252.. code-block:: console
253
254   $ minicom -D /dev/ttyACM0
255
256Then build and flash the application.
257
258.. zephyr-app-commands::
259   :zephyr-app: samples/hello_world
260   :board: stm32u083c_dk
261   :goals: build flash
262
263You should see the following message on the console:
264
265.. code-block:: console
266
267   Hello World! stm32u083c_dk/stm32u083xx
268
269Debugging
270=========
271
272Default flasher for this board is openocd. It could be used in the usual way.
273Here is an example for the :zephyr:code-sample:`blinky` application.
274
275.. zephyr-app-commands::
276   :zephyr-app: samples/basic/blinky
277   :board: nucleo_u083rc
278   :goals: debug
279
280Note: Check the ``build/tfm`` directory to ensure that the commands required by these scripts
281(``readlink``, etc.) are available on your system. Please also check ``STM32_Programmer_CLI``
282(which is used for initialization) is available in the PATH.
283
284.. _STM32U083_DK website:
285   https://www.st.com/en/evaluation-tools/stm32u083c-dk.html
286
287.. _STM32U083MC User Manual:
288   https://www.st.com/resource/en/user_manual/um3292-discovery-kit-with-STM32U083MC-MCU.pdf
289
290.. _STM32U083MC on www.st.com:
291   https://www.st.com/en/microcontrollers-microprocessors/stm32u083mc
292
293.. _STM32U083 reference manual:
294   https://www.st.com/resource/en/reference_manual/rm0503-stm32u0-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
295
296.. _STM32CubeProgrammer:
297   https://www.st.com/en/development-tools/stm32cubeprog.html
298