boards/weact/stm32h562_core/doc/index.rst
.. zephyr:board:: weact_stm32h562_core
Overview
The weact_stm32h562_core board is a compact development board equipped with
an STM32H562RGT6 microcontroller. It features basic set of peripherals:
user LED and button, microSD™ card slot, and combined SWD & UART header.
Key Features
STM32 microcontroller in LQFP64 package
USB OTG or full-speed device
1 user LED
User, boot, and reset push-buttons
32.768 kHz and 8MHz HSE crystal oscillators
Board connectors:
More information about the board can be found on the WeAct GitHub_.
Hardware
The weact_stm32h562_core board provides the following hardware components:
More information about STM32H562RG can be found here:
STM32H562RG on www.st.com_STM32H562 reference manual_.. zephyr:board-supported-hw::
The weact_stm32h562_core board is configured as follows
The STM32H562RG System Clock can be driven by an internal or external oscillator, as well as by the main PLL clock. By default, the System clock is driven by the PLL clock at 240MHz. PLL clock is fed by a 8MHz external clock.
The Zephyr console output is assigned to the USB CDC ACM virtual serial port. Virtual COM port interface. Default communication settings are 115200 8N1.
Programming and Debugging
.. zephyr:board-supported-runners::
The weact_stm32h562_core board facilitates firmware flashing via the USB DFU
bootloader. This method simplifies the process of updating images, although
it doesn't provide debugging capabilities. However, the board provides header
pins for the Serial Wire Debug (SWD) interface, which can be used to connect
an external debugger, such as ST-Link.
To activate the bootloader, follow these steps:
Upon successful execution of these steps, the device will transition into bootloader mode and present itself as a USB DFU Mode device. You can program the device using the west tool or the STM32CubeProgrammer.
weact_stm32h562_coreHere is an example for the :zephyr:code-sample:hello_world application.
First, put the board in bootloader mode as described above. Then build and flash
the application in the usual way. Just add CONFIG_BOOT_DELAY=5000 to the
configuration, so that USB CDC ACM is initialized before any text is printed,
as below:
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: weact_stm32h562_core :goals: build flash :gen-args: -DCONFIG_BOOT_DELAY=5000
Run a serial host program to connect with your board:
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Then, press the RESET button, you should see the following message after few seconds:
.. code-block:: console
Hello World! weact_stm32h562_core
Replace :code:<tty_device> with the port where the board can be found.
For example, under Linux, :code:/dev/ttyACM0.
This current Zephyr port does not support debugging.
Testing the LEDs in the weact_stm32h562_core
There is a sample that allows to test that LED on the board are working properly with Zephyr:
.. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: weact_stm32h562_core :goals: build flash :gen-args: -DCONFIG_BOOT_DELAY=5000
You can build and flash the examples to make sure Zephyr is running correctly on
your board. The LED definitions can be found in
:zephyr_file:boards/weact/stm32h562_core/weact_stm32h562_core.dts.
Testing shell over USB in the weact_stm32h562_core
There is a sample that allows to test shell interface over USB CDC ACM interface with Zephyr:
.. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/shell_module :board: weact_stm32h562_core :goals: build flash :gen-args: -DCONFIG_BOOT_DELAY=5000
.. _WeAct GitHub: https://github.com/WeActStudio/WeActStudio.STM32H5_64Pin_CoreBoard
.. _STM32H562RG on www.st.com: https://www.st.com/en/microcontrollers-microprocessors/stm32h562rg.html
.. _STM32H562 reference manual: https://www.st.com/resource/en/reference_manual/rm0481-stm32h52333xx-stm32h56263xx-and-stm32h573xx-armbased-32bit-mcus-stmicroelectronics.pdf