-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: ruiside: art-pi2: add minimum support #88185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copyright (c) 2025 Shan Pen <[email protected]> | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_ART_PI2 | ||
| select SOC_STM32H7R7XX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| /* | ||
| * Copyright (c) 2025 Shan Pen <[email protected]> | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
| #include <st/h7rs/stm32h7r7X8.dtsi> | ||
| #include <st/h7/stm32h7r7l8hxh-pinctrl.dtsi> | ||
| #include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
|
||
| / { | ||
| model = "Ruiside Electronic ART-Pi2 board"; | ||
| compatible = "ruiside,art-pi2"; | ||
|
|
||
| chosen { | ||
| zephyr,console = &uart4; | ||
| zephyr,shell-uart = &uart4; | ||
| zephyr,sram = &sram0; | ||
| zephyr,flash = &flash0; | ||
| }; | ||
|
|
||
| leds: leds { | ||
| compatible = "gpio-leds"; | ||
|
|
||
| red_led: led_1 { | ||
| gpios = <&gpioo 1 GPIO_ACTIVE_HIGH>; | ||
| label = "User LED1"; | ||
| }; | ||
|
|
||
| blue_led: led_2 { | ||
| gpios = <&gpioo 5 GPIO_ACTIVE_LOW>; | ||
| label = "User LED2"; | ||
| }; | ||
| }; | ||
|
|
||
| gpio_keys { | ||
| compatible = "gpio-keys"; | ||
|
|
||
| user_button: button_0 { | ||
| label = "User"; | ||
| gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; | ||
| zephyr,code = <INPUT_KEY_0>; | ||
| }; | ||
| }; | ||
|
|
||
| aliases { | ||
| led0 = &red_led; | ||
| led1 = &blue_led; | ||
| sw0 = &user_button; | ||
| watchdog0 = &iwdg; | ||
| die-temp0 = &die_temp; | ||
| volt-sensor0 = &vref; | ||
| volt-sensor1 = &vbat; | ||
| }; | ||
| }; | ||
|
|
||
| &dtcm { | ||
| reg = <0x20000000 DT_SIZE_K(64)>; | ||
| }; | ||
|
|
||
| &clk_hsi48 { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &clk_hse { | ||
| clock-frequency = <DT_FREQ_M(24)>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &pll { | ||
| div-m = <12>; | ||
| mul-n = <250>; | ||
| div-p = <2>; | ||
| div-q = <2>; | ||
| div-r = <2>; | ||
| div-s = <2>; | ||
| div-t = <2>; | ||
| clocks = <&clk_hse>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &rcc { | ||
| clocks = <&pll>; | ||
| clock-frequency = <DT_FREQ_M(250)>; | ||
| dcpre = <1>; | ||
| hpre = <1>; | ||
| ppre1 = <2>; | ||
| ppre2 = <2>; | ||
| ppre4 = <2>; | ||
| ppre5 = <2>; | ||
| }; | ||
|
|
||
| &uart4 { | ||
| pinctrl-0 = <&uart4_tx_pd1 &uart4_rx_pd0>; | ||
| pinctrl-names = "default"; | ||
| current-speed = <115200>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &rng { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &iwdg { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &wwdg { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &vref { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &vbat { | ||
| status = "okay"; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| identifier: art_pi2 | ||
| name: art pi2 | ||
| type: mcu | ||
| arch: arm | ||
| toolchain: | ||
| - zephyr | ||
| ram: 640 | ||
| flash: 64 | ||
| supported: | ||
| - gpio | ||
| - uart | ||
| - watchdog | ||
| - entropy | ||
| vendor: ruiside |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Copyright (c) 2025 Shan Pen <[email protected]> | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Enable SMPS | ||
| CONFIG_POWER_SUPPLY_DIRECT_SMPS=y | ||
|
|
||
| # Enable MPU | ||
| CONFIG_ARM_MPU=y | ||
|
|
||
| # Enable HW stack protection | ||
| CONFIG_HW_STACK_PROTECTION=y | ||
|
|
||
| # Enable UART driver | ||
| CONFIG_SERIAL=y | ||
| # Enable console | ||
| CONFIG_CONSOLE=y | ||
| CONFIG_UART_CONSOLE=y | ||
|
|
||
| # Enable GPIO | ||
| CONFIG_GPIO=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # keep first | ||
| board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") | ||
| board_runner_args(pyocd "--target=stm32h7r7l8hxh") | ||
|
|
||
| # keep first | ||
| include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) | ||
| include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| board: | ||
| name: art_pi2 | ||
| full_name: ART-Pi2 | ||
| vendor: ruiside | ||
| socs: | ||
| - name: stm32h7r7xx |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,163 @@ | ||||||||||||||
| .. zephyr:board:: art_pi2 | ||||||||||||||
|
|
||||||||||||||
| Overview | ||||||||||||||
| ******** | ||||||||||||||
|
|
||||||||||||||
| The ART-Pi2 is an open-source hardware platform designed by the | ||||||||||||||
| RT-Thread team specifically for embedded software engineers | ||||||||||||||
| and open-source makers, offering extensive expandability for DIY projects. | ||||||||||||||
|
|
||||||||||||||
| Key Features | ||||||||||||||
|
|
||||||||||||||
| - STM32H7R7L8HxH microcontroller featuring 64 Kbytes of Flash and 620 Kbytes of SRAM in an TFBGA225 package | ||||||||||||||
| - On-board ST-LINK/V2.1 debugger/programmer | ||||||||||||||
| - SDIO TF Card slot | ||||||||||||||
| - SDIO WIFI:CYWL6208 | ||||||||||||||
| - HDC UART BuleTooth:CYWL6208 | ||||||||||||||
| - 32-MB HyperRAM | ||||||||||||||
| - 64-MB HyperFlash | ||||||||||||||
| - One Power LED (blue) for 3.3 V power-on | ||||||||||||||
| - Two user LEDs blue and red | ||||||||||||||
| - Two ST-LINK LEDs: blue and red | ||||||||||||||
| - Two push-buttons (user and reset) | ||||||||||||||
| - Board connectors: | ||||||||||||||
|
|
||||||||||||||
| - USB OTG with Type-C connector | ||||||||||||||
| - RGB888 FPC connector | ||||||||||||||
|
|
||||||||||||||
| More information about the board can be found at the `ART-Pi2 website`_. | ||||||||||||||
|
|
||||||||||||||
| Hardware | ||||||||||||||
| ******** | ||||||||||||||
|
|
||||||||||||||
| ART-Pi2 provides the following hardware components: | ||||||||||||||
|
|
||||||||||||||
| The STM32H7R7xx devices are a high-performance microcontrollers family (STM32H7 | ||||||||||||||
| Series) based on the high-performance Arm |reg| Cortex |reg|-M7 32-bit RISC core. | ||||||||||||||
| They operate at a frequency of up to 600 MHz. | ||||||||||||||
|
|
||||||||||||||
| More information about STM32H7R7 can be found here: | ||||||||||||||
|
|
||||||||||||||
| - `STM32H7R7L8 on www.st.com`_ | ||||||||||||||
| - `STM32H7Rx reference manual`_ | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Supported Features | ||||||||||||||
| ================== | ||||||||||||||
|
|
||||||||||||||
| .. zephyr:board-supported-hw:: | ||||||||||||||
|
|
||||||||||||||
| Default Zephyr Peripheral Mapping: | ||||||||||||||
| ---------------------------------- | ||||||||||||||
|
|
||||||||||||||
| The ART-Pi2 board features a On-board ST-LINK/V2.1 debugger/programmer. Board is configured as follows: | ||||||||||||||
|
|
||||||||||||||
| - UART4 TX/RX : PD1/PD0 (ST-Link Virtual Port Com) | ||||||||||||||
| - LED1 (red) : PO1 | ||||||||||||||
| - LED2 (blue) : PO5 | ||||||||||||||
| - USER PUSH-BUTTON : PC13 | ||||||||||||||
|
|
||||||||||||||
| System Clock | ||||||||||||||
| ------------ | ||||||||||||||
|
|
||||||||||||||
| ART-Pi2 System Clock could be driven by an internal or external | ||||||||||||||
| oscillator, as well as the main PLL clock. By default, the System clock is | ||||||||||||||
| driven by the PLL clock at 250MHz, driven by an 24MHz high-speed external clock. | ||||||||||||||
|
|
||||||||||||||
| Serial Port | ||||||||||||||
| ----------- | ||||||||||||||
|
|
||||||||||||||
| ART-Pi2 board has 4 UARTs and 3 USARTs plus one LowPower UART. The Zephyr console | ||||||||||||||
| output is assigned to UART4. Default settings are 115200 8N1. | ||||||||||||||
|
|
||||||||||||||
| Backup SRAM | ||||||||||||||
| ----------- | ||||||||||||||
|
|
||||||||||||||
| In order to test backup SRAM you may want to disconnect VBAT from VDD. You can | ||||||||||||||
| do it by removing ``SB13`` jumper on the back side of the board. | ||||||||||||||
|
|
||||||||||||||
| Programming and Debugging | ||||||||||||||
| ************************* | ||||||||||||||
|
|
||||||||||||||
| .. zephyr:board-supported-runners:: | ||||||||||||||
|
|
||||||||||||||
| ART-Pi2 board includes an ST-LINK/V2.1 embedded debug tool interface. | ||||||||||||||
|
|
||||||||||||||
| .. note:: | ||||||||||||||
|
|
||||||||||||||
| Check if your ST-LINK V2.1 has newest FW version. It can be done with `STM32CubeProgrammer`_ | ||||||||||||||
|
|
||||||||||||||
| Flashing | ||||||||||||||
| ======== | ||||||||||||||
|
|
||||||||||||||
| The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, | ||||||||||||||
| so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. | ||||||||||||||
|
|
||||||||||||||
| Flashing an application to ART-Pi2 | ||||||||||||||
| ---------------------------------- | ||||||||||||||
|
|
||||||||||||||
| First, connect the art_pi2 to your host computer using | ||||||||||||||
| the USB port to prepare it for flashing. Then build and flash your application. | ||||||||||||||
|
|
||||||||||||||
| Here is an example for the :zephyr:code-sample:`hello_world` application. | ||||||||||||||
|
|
||||||||||||||
| Run a serial host program to connect with your art_pi2 board. | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: console | ||||||||||||||
|
|
||||||||||||||
| $ minicom -b 115200 -D /dev/ttyACM0 | ||||||||||||||
|
|
||||||||||||||
| or use screen: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: console | ||||||||||||||
|
|
||||||||||||||
| $ screen /dev/ttyACM0 115200 | ||||||||||||||
|
|
||||||||||||||
| Build and flash the application: | ||||||||||||||
|
|
||||||||||||||
| .. zephyr-app-commands:: | ||||||||||||||
| :zephyr-app: samples/hello_world | ||||||||||||||
| :board: art_pi2 | ||||||||||||||
| :goals: build flash | ||||||||||||||
|
|
||||||||||||||
| You should see the following message on the console: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: console | ||||||||||||||
|
|
||||||||||||||
| *** Booting Zephyr OS build v4.1.0-1907-g415ab379a8af *** | ||||||||||||||
| Hello World! art_pi2/stm32h7r7xx | ||||||||||||||
|
|
||||||||||||||
| Blinky example can also be used: | ||||||||||||||
|
|
||||||||||||||
| .. zephyr-app-commands:: | ||||||||||||||
| :zephyr-app: samples/basic/blinky | ||||||||||||||
| :board: art_pi2 | ||||||||||||||
| :goals: build flash | ||||||||||||||
|
|
||||||||||||||
| Debugging | ||||||||||||||
| ========= | ||||||||||||||
|
|
||||||||||||||
| You can debug an application in the usual way. Here is an example for the | ||||||||||||||
| :zephyr:code-sample:`hello_world` application. | ||||||||||||||
|
|
||||||||||||||
| .. zephyr-app-commands:: | ||||||||||||||
| :zephyr-app: samples/hello_world | ||||||||||||||
| :board: art_pi2 | ||||||||||||||
| :maybe-skip-config: | ||||||||||||||
| :goals: debug | ||||||||||||||
|
|
||||||||||||||
| References | ||||||||||||||
| ********** | ||||||||||||||
| .. target-notes:: | ||||||||||||||
|
|
||||||||||||||
| .. _ART-Pi2 website: | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| https://github.com/RT-Thread-Studio/sdk-bsp-stm32h7r-realthread-artpi2 | ||||||||||||||
|
|
||||||||||||||
| .. _STM32H7R7L8 on www.st.com: | ||||||||||||||
| https://www.st.com/en/microcontrollers-microprocessors/stm32h7r7l8.html | ||||||||||||||
|
|
||||||||||||||
| .. _STM32H7Rx reference manual: | ||||||||||||||
| https://www.st.com/resource/en/reference_manual/rm0477-stm32h7rx7sx-armbased-32bit-mcus-stmicroelectronics.pdf | ||||||||||||||
|
|
||||||||||||||
| .. _STM32CubeProgrammer: | ||||||||||||||
| https://www.st.com/en/development-tools/stm32cubeprog.html | ||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| .. _boards-Ruiside: | ||
|
|
||
| Ruiside | ||
| ####### | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :glob: | ||
|
|
||
| **/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.