boards: add weact rp2350b_core
add weact rp2350b board Signed-off-by: Camille BAUD <mail@massdriver.space>
This commit is contained in:
committed by
Fabio Baltieri
parent
21c1417f31
commit
8049f25a08
11
boards/weact/rp2350b_core/Kconfig.defconfig
Normal file
11
boards/weact/rp2350b_core/Kconfig.defconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2026 MASSDRIVER EI (massdriver.space
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_RP2350B_CORE
|
||||
|
||||
config USB_SELF_POWERED
|
||||
default n
|
||||
|
||||
source "boards/common/usb/Kconfig.cdc_acm_serial.defconfig"
|
||||
|
||||
endif # BOARD_RP2350B_CORE
|
||||
6
boards/weact/rp2350b_core/Kconfig.rp2350b_core
Normal file
6
boards/weact/rp2350b_core/Kconfig.rp2350b_core
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2026 MASSDRIVER EI (massdriver.space)
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_RP2350B_CORE
|
||||
select SOC_RP2350B_HAZARD3 if BOARD_RP2350B_CORE_RP2350B_HAZARD3
|
||||
select SOC_RP2350B_M33 if BOARD_RP2350B_CORE_RP2350B_M33
|
||||
27
boards/weact/rp2350b_core/board.cmake
Normal file
27
boards/weact/rp2350b_core/board.cmake
Normal file
@@ -0,0 +1,27 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if("${RPI_PICO_DEBUG_ADAPTER}" STREQUAL "")
|
||||
set(RPI_PICO_DEBUG_ADAPTER "cmsis-dap")
|
||||
endif()
|
||||
|
||||
board_runner_args(openocd --cmd-pre-init "source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]")
|
||||
if(CONFIG_ARM)
|
||||
board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]")
|
||||
else()
|
||||
board_runner_args(openocd --cmd-pre-init "source [find target/rp2350-riscv.cfg]")
|
||||
endif()
|
||||
|
||||
# The adapter speed is expected to be set by interface configuration.
|
||||
# The Raspberry Pi's OpenOCD fork doesn't, so match their documentation at
|
||||
# https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#debugging-with-swd
|
||||
board_runner_args(openocd --cmd-pre-init "set_adapter_speed_if_not_set 1000")
|
||||
|
||||
board_runner_args(probe-rs "--chip=RP235x")
|
||||
|
||||
board_runner_args(jlink "--device=RP2350_M33_0")
|
||||
board_runner_args(uf2 "--board-id=RP2350")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/probe-rs.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
6
boards/weact/rp2350b_core/board.yml
Normal file
6
boards/weact/rp2350b_core/board.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
board:
|
||||
name: rp2350b_core
|
||||
full_name: WeAct RP2350B Core
|
||||
vendor: weact
|
||||
socs:
|
||||
- name: rp2350b
|
||||
BIN
boards/weact/rp2350b_core/doc/img/rp2350b_core.webp
Normal file
BIN
boards/weact/rp2350b_core/doc/img/rp2350b_core.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
56
boards/weact/rp2350b_core/doc/index.rst
Normal file
56
boards/weact/rp2350b_core/doc/index.rst
Normal file
@@ -0,0 +1,56 @@
|
||||
.. zephyr:board:: rp2350b_core
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The WeAct RP2350B Core is a barebone development board for the RP2350B microcontroller by raspberry pi.
|
||||
It supports running code on either a single Cortex-M33 or a Hazard3 (RISC-V) core.
|
||||
|
||||
As with other RP2 boards, there's no support for running any code on the second core.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
- Dual Cortex-M33 or Hazard3 processors at up to 150MHz
|
||||
- 520KB of SRAM, and 16MB of on-board flash memory
|
||||
- USB 1.1 with device and host support
|
||||
- Low-power sleep and dormant modes
|
||||
- Drag-and-drop programming using mass storage over USB
|
||||
- 48 multi-function GPIO pins including 8 that can be used for ADC
|
||||
- 2 SPI, 2 I2C, 2 UART, One 12-bit 500ksps Analogue to Digital - Converter (ADC) with 8 channels, 24 controllable PWM channels
|
||||
- 2 Timer with 4 alarms, 1 AON Timer
|
||||
- Temperature sensor
|
||||
- 3 Programmable IO (PIO) blocks, 12 state machines total for custom peripheral support
|
||||
|
||||
- `rp2350b_core Schematics`_
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
.. zephyr:board-supported-hw::
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
- Blue LED on pin 25.
|
||||
- User button on pin 23.
|
||||
- It is possible to add a second flash or a PSRAM chip to the back of the board. The CS is Pin 0. This is not currently supported in zephyr.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
.. zephyr:board-supported-runners::
|
||||
|
||||
The overall explanation regarding flashing and debugging is the same as for :zephyr:board:`rpi_pico`.
|
||||
See :ref:`rpi_pico_programming_and_debugging` in :zephyr:board:`rpi_pico` documentation. N.b. OpenOCD support requires using Raspberry Pi's forked version of OpenOCD.
|
||||
|
||||
Below is an example of building and flashing the :zephyr:code-sample:`blinky` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/basic/blinky
|
||||
:board: rp2350b_core/rp2350b/m33
|
||||
:goals: build flash
|
||||
:flash-args: -r uf2
|
||||
|
||||
.. _rp2350b_core Schematics:
|
||||
https://github.com/WeActStudio/WeActStudio.RP2350BCoreBoard/blob/main/HDK/RP2350B_SCH.pdf
|
||||
52
boards/weact/rp2350b_core/rp2350b_core-pinctrl.dtsi
Normal file
52
boards/weact/rp2350b_core/rp2350b_core-pinctrl.dtsi
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2026 MASSDRIVER EI (massdriver.space)
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pinctrl/rpi-pico-rp2350b-pinctrl.h>
|
||||
|
||||
&pinctrl {
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
pinmux = <UART0_TX_P32>;
|
||||
};
|
||||
|
||||
group2 {
|
||||
pinmux = <UART0_RX_P33>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
pinmux = <I2C0_SDA_P4>, <I2C0_SCL_P5>;
|
||||
input-enable;
|
||||
input-schmitt-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_default: i2c1_default {
|
||||
group1 {
|
||||
pinmux = <I2C1_SDA_P6>, <I2C1_SCL_P7>;
|
||||
input-enable;
|
||||
input-schmitt-enable;
|
||||
};
|
||||
};
|
||||
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
pinmux = <SPI0_CSN_P17>, <SPI0_SCK_P18>, <SPI0_TX_P19>;
|
||||
};
|
||||
|
||||
group2 {
|
||||
pinmux = <SPI0_RX_P16>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
pwm_ch4b_default: pwm_ch4b_default {
|
||||
group1 {
|
||||
pinmux = <PWM_4B_P25>;
|
||||
};
|
||||
};
|
||||
};
|
||||
147
boards/weact/rp2350b_core/rp2350b_core.dtsi
Normal file
147
boards/weact/rp2350b_core/rp2350b_core.dtsi
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* Copyright (c) 2026 MASSDRIVER EI (massdriver.space)
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <freq.h>
|
||||
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
#include <zephyr/dt-bindings/pwm/pwm.h>
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
#include "rp2350b_core-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,flash-controller = &qmi;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
uart,passthrough = &uart0;
|
||||
};
|
||||
|
||||
aliases {
|
||||
watchdog0 = &wdt0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led0: led_0 {
|
||||
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_leds {
|
||||
compatible = "pwm-leds";
|
||||
status = "disabled";
|
||||
|
||||
pwm_led0: pwm_led_0 {
|
||||
pwms = <&pwm 9 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
||||
label = "PWM_LED";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button_0: sw0 {
|
||||
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
pwm-led0 = &pwm_led0;
|
||||
sw0 = &button_0;
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
reg = <0x10000000 DT_SIZE_M(16)>;
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
|
||||
slot0_partition: partition@0 {
|
||||
label = "image-0";
|
||||
reg = <0x0 0x400000>;
|
||||
};
|
||||
|
||||
slot1_partition: partition@400000 {
|
||||
label = "image-1";
|
||||
reg = <0x400000 0x400000>;
|
||||
};
|
||||
|
||||
storage_partition: partition@800000 {
|
||||
label = "storage";
|
||||
reg = <0x800000 0x800000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
gpio0_lo: &gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpio1: &gpio0_hi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
clock-frequency = <DT_FREQ_M(20)>;
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
clock-frequency = <I2C_BITRATE_FAST_PLUS>;
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
pinctrl-0 = <&i2c1_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-0 = <&pwm_ch4b_default>;
|
||||
pinctrl-names = "default";
|
||||
divider-int-0 = <255>;
|
||||
};
|
||||
|
||||
&timer0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wdt0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rng {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#include <../boards/common/usb/cdc_acm_serial.dtsi>
|
||||
18
boards/weact/rp2350b_core/rp2350b_core_rp2350b_hazard3.dts
Normal file
18
boards/weact/rp2350b_core/rp2350b_core_rp2350b_hazard3.dts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Andrew Featherstone
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/* The build system assumes that there's a cpucluster-specific file.
|
||||
*
|
||||
* This file provides composition of the device tree:
|
||||
* 1. The common features of the SoC
|
||||
* 2. Core-specific configuration.
|
||||
* 3. Board-specific configuration.
|
||||
*/
|
||||
#include <raspberrypi/rpi_pico/rp2350b.dtsi>
|
||||
#include <riscv/raspberrypi/hazard3.dtsi>
|
||||
#include "rp2350b_core.dtsi"
|
||||
20
boards/weact/rp2350b_core/rp2350b_core_rp2350b_hazard3.yaml
Normal file
20
boards/weact/rp2350b_core/rp2350b_core_rp2350b_hazard3.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
identifier: rp2350b_core/rp2350b/hazard3
|
||||
name: WeAct RP2350B Core (Hazard3)
|
||||
type: mcu
|
||||
arch: riscv
|
||||
flash: 4096
|
||||
ram: 520
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported:
|
||||
- clock
|
||||
- counter
|
||||
- dma
|
||||
- gpio
|
||||
- hwinfo
|
||||
- i2c
|
||||
- pwm
|
||||
- spi
|
||||
- uart
|
||||
- usbd
|
||||
- watchdog
|
||||
@@ -0,0 +1,13 @@
|
||||
# This configuration is orthogonal to whether the Cortex-M33 or Hazard3 cores
|
||||
# are in use, but Zephyr does not support providing a qualifier-agnostic
|
||||
# _defconfig file.
|
||||
CONFIG_BUILD_OUTPUT_HEX=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_RESET=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
18
boards/weact/rp2350b_core/rp2350b_core_rp2350b_m33.dts
Normal file
18
boards/weact/rp2350b_core/rp2350b_core_rp2350b_m33.dts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Andrew Featherstone
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/* The build system assumes that there's a cpucluster-specific file.
|
||||
*
|
||||
* This file provides composition of the device tree:
|
||||
* 1. The common features of the SoC
|
||||
* 2. Core-specific configuration.
|
||||
* 3. Board-specific configuration.
|
||||
*/
|
||||
#include <raspberrypi/rpi_pico/rp2350b.dtsi>
|
||||
#include <raspberrypi/rpi_pico/m33.dtsi>
|
||||
#include "rp2350b_core.dtsi"
|
||||
23
boards/weact/rp2350b_core/rp2350b_core_rp2350b_m33.yaml
Normal file
23
boards/weact/rp2350b_core/rp2350b_core_rp2350b_m33.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
identifier: rp2350b_core/rp2350b/m33
|
||||
name: WeAct RP2350B Core (Cortex-M33)
|
||||
type: mcu
|
||||
arch: arm
|
||||
flash: 4096
|
||||
ram: 520
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
supported:
|
||||
- clock
|
||||
- counter
|
||||
- crypto
|
||||
- dma
|
||||
- entropy
|
||||
- gpio
|
||||
- hwinfo
|
||||
- i2c
|
||||
- pwm
|
||||
- spi
|
||||
- uart
|
||||
- usbd
|
||||
- watchdog
|
||||
13
boards/weact/rp2350b_core/rp2350b_core_rp2350b_m33_defconfig
Normal file
13
boards/weact/rp2350b_core/rp2350b_core_rp2350b_m33_defconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# This configuration is orthogonal to whether the Cortex-M33 or Hazard3 cores
|
||||
# are in use, but Zephyr does not support providing a qualifier-agnostic
|
||||
# _defconfig file.
|
||||
CONFIG_BUILD_OUTPUT_HEX=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_RESET=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
11
boards/weact/rp2350b_core/support/openocd.cfg
Normal file
11
boards/weact/rp2350b_core/support/openocd.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2024 TOKITA Hiroshi
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Checking and set 'adapter speed'.
|
||||
# Set the adaptor speed, if unset, and given as an argument.
|
||||
proc set_adapter_speed_if_not_set { speed } {
|
||||
puts "checking adapter speed..."
|
||||
if { [catch {adapter speed} ret] } {
|
||||
adapter speed $speed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user