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