1.. zephyr:board:: mini_stm32h743
2
3Overview
4********
5
6The MiniSTM32H743 Core board is a compact development board equipped with
7an STM32H743VIT6 microcontroller. It features a variety of peripherals,
8including a user LED and button, a display, and external SPI and QuadSPI
9NOR flash memory.
10
11Key Features
12
13- STM32 microcontroller in LQFP100 package
14- USB OTG or full-speed device
15- 1 user LED
16- User, boot, and reset push-buttons
17- 32.768 kHz and 25MHz HSE crystal oscillators
18- External NOR Flash memories: 64-Mbit Quad-SPI and 64-Mbit SPI
19- Board connectors:
20   - Camera (8 bit) connector
21   - ST7735 TFT-LCD 160 x 80 pixels (RGB565 3-SPI)
22   - microSD |trade| card
23   - USB Type-C Connector
24   - SWD header for external debugger
25   - 2x 40-pin GPIO connector
26
27More information about the board can be found on the `Mini_STM32H743 website`_.
28
29Hardware
30********
31
32The MiniSTM32H743 Core board provides the following hardware components:
33
34- STM32H743VIT6 in LQFP100 package
35- ARM 32-bit Cortex-M7 CPU with FPU
36- Chrom-ART Accelerator
37- Hardware JPEG Codec
38- 480 MHz max CPU frequency
39- VDD from 1.62 V to 3.6 V
40- 2 MB Flash
41- ~1 MB SRAM
42- High-resolution timer (2.1 ns)
43- 32-bit timers(2)
44- 16-bit timers(10)
45- SPI(6)
46- I2C(4)
47- I2S (3)
48- USART(4)
49- UART(4)
50- USB OTG Full Speed and High Speed(1)
51- USB OTG Full Speed(1)
52- CAN FD(2)
53- SAI(4)
54- SPDIF_Rx(4)
55- HDMI_CEC(1)
56- Dual Mode Quad SPI(1)
57- Camera Interface
58- GPIO (up to 82) with external interrupt capability
59- 16-bit ADC(3) with 16 channels
60- 12-bit DAC with 2 channels(2)
61- True Random Number Generator (RNG)
62- 16-channel DMA
63- LCD-TFT Controller with XGA resolution
64
65More information about STM32H743 can be found here:
66
67- `STM32H743VI on www.st.com`_
68- `STM32H743/753 reference manual`_
69- `STM32H743VI datasheet`_
70
71Supported Features
72==================
73
74The mini_stm32h743 board configuration supports the following hardware features:
75
76+-----------+------------+-------------------------------------+
77| Interface | Controller | Driver/Component                    |
78+===========+============+=====================================+
79| NVIC      | on-chip    | nested vector interrupt controller  |
80+-----------+------------+-------------------------------------+
81| WDT       | on-chip    | watchdog                            |
82+-----------+------------+-------------------------------------+
83| PINMUX    | on-chip    | pinmux                              |
84+-----------+------------+-------------------------------------+
85| FLASH     | on-chip    | flash memory                        |
86+-----------+------------+-------------------------------------+
87| GPIO      | on-chip    | gpio                                |
88+-----------+------------+-------------------------------------+
89| SPI       | on-chip    | spi                                 |
90+-----------+------------+-------------------------------------+
91| QSPI NOR  | on-chip    | off-chip flash                      |
92+-----------+------------+-------------------------------------+
93| SDMMC     | on-chip    | disk access                         |
94+-----------+------------+-------------------------------------+
95| DISPLAY   | on-chip    | display                             |
96+-----------+------------+-------------------------------------+
97
98Other hardware features have not been enabled yet for this board.
99
100The default configuration per core can be found in the defconfig file:
101``boards/weact/mini_stm32h743/mini_stm32h743_defconfig``
102
103Pin Mapping
104===========
105
106MiniSTM32H743 Core board has 5 GPIO controllers. These controllers are responsible for pin muxing,
107input/output, pull-up, etc.
108
109For more details please refer to `Mini_STM32H743 website`_.
110
111Default Zephyr Peripheral Mapping:
112----------------------------------
113
114The MiniSTM32H743 Core board is configured as follows
115
116- USER_LED : PE3
117- USER_PB : PC13
118- SPI1 SCK/MISO/MOSI/NSS : PB3/PB4/PD7/PD6 (NOR Flash memory)
119- SPI4 SCK/MOSI/NSS : PE12/PE14/PE11 (LCD)
120- QuadSPI CLK/NCS/IO0/IO1/IO2/IO3 : PB2/PB6/PD11/PD12/PE2/PD13 (NOR Flash memory)
121- SDMMC1 CLK/DCMD/CD/D0/D1/D2/D3 : PC12/PD2/PD4/PC8/PC9/PC10/PC11 (microSD card)
122- USB DM/DP : PA11/PA12 (USB CDC ACM)
123
124System Clock
125============
126
127The STM32H743VI System Clock can be driven by an internal or external oscillator,
128as well as by the main PLL clock. By default, the System clock is driven
129by the PLL clock at 240MHz. PLL clock is fed by a 25MHz high speed external clock.
130
131Serial Port (USB CDC ACM)
132=========================
133
134The Zephyr console output is assigned to the USB CDC ACM virtual serial port.
135Virtual COM port interface. Default communication settings are 115200 8N1.
136
137Programming and Debugging
138*************************
139
140The MiniSTM32H743 Core board facilitates firmware flashing via the USB DFU
141bootloader. This method simplifies the process of updating images, although
142it doesn't provide debugging capabilities. However, the board provides header
143pins for the Serial Wire Debug (SWD) interface, which can be used to connect
144an external debugger, such as ST-Link.
145
146Flashing
147========
148
149To activate the bootloader, follow these steps:
150
1511. Press and hold the BOOT0 key.
1522. While still holding the BOOT0 key, press and release the RESET key.
1533. Wait for 0.5 seconds, then release the BOOT0 key.
154
155Upon successful execution of these steps, the device will transition into
156bootloader mode and present itself as a USB DFU Mode device. You can program
157the device using the west tool or the STM32CubeProgrammer.
158
159Flashing an application to MiniSTM32H743
160----------------------------------------
161
162Here is an example for the :zephyr:code-sample:`hello_world` application.
163
164First, put the board in bootloader mode as described above. Then build and flash
165the application in the usual way. Just add ``CONFIG_BOOT_DELAY=5000`` to the
166configuration, so that USB CDC ACM is initialized before any text is printed,
167as below:
168
169.. zephyr-app-commands::
170   :zephyr-app: samples/hello_world
171   :board: mini_stm32h743
172   :goals: build flash
173   :gen-args: -DCONFIG_BOOT_DELAY=5000
174
175Run a serial host program to connect with your board:
176
177.. code-block:: console
178
179   $ minicom -D <tty_device> -b 115200
180
181Then, press the RESET button, you should see the following message after few seconds:
182
183.. code-block:: console
184
185   Hello World! mini_stm32h743
186
187Replace :code:`<tty_device>` with the port where the board XIAO BLE
188can be found. For example, under Linux, :code:`/dev/ttyACM0`.
189
190Debugging
191---------
192
193This current Zephyr port does not support debugging.
194
195Testing the LEDs in the MiniSTM32H743
196*************************************
197
198There is a sample that allows to test that LED on the board are working
199properly with Zephyr:
200
201.. zephyr-app-commands::
202   :zephyr-app: samples/basic/blinky
203   :board: mini_stm32h743
204   :goals: build flash
205   :gen-args: -DCONFIG_BOOT_DELAY=5000
206
207You can build and flash the examples to make sure Zephyr is running correctly on
208your board. The LED definitions can be found in
209:zephyr_file:`boards/weact/mini_stm32h743/mini_stm32h743.dts`.
210
211Testing shell over USB in the MiniSTM32H743
212*******************************************
213
214There is a sample that allows to test shell interface over USB CDC ACM interface
215with Zephyr:
216
217.. zephyr-app-commands::
218   :zephyr-app: samples/subsys/shell/shell_module
219   :board: mini_stm32h743
220   :goals: build flash
221   :gen-args: -DCONFIG_BOOT_DELAY=5000
222
223.. _Mini_STM32H743 website:
224   https://github.com/WeActStudio/MiniSTM32H7xx
225
226.. _STM32H743VI on www.st.com:
227   https://www.st.com/en/microcontrollers-microprocessors/stm32h743vi.html#overview
228
229.. _STM32H743/753 reference manual:
230   https://www.st.com/resource/en/reference_manual/rm0433-stm32h742-stm32h743753-and-stm32h750-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
231
232.. _STM32H743VI datasheet:
233   https://www.st.com/resource/en/datasheet/stm32h743vi.pdf
234