Skip to content

Commit 20ffe6f

Browse files
bikeNomaddpgeorge
authored andcommitted
rp2/boards/WAVESHARE_RP2350B_CORE: Add Waveshare RP2350B Core board.
Signed-off-by: Ned Konz <ned@metamagix.tech>
1 parent 3a24bdb commit 20ffe6f

7 files changed

Lines changed: 113 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"Dual-core",
8+
"External Flash",
9+
"External RAM",
10+
"USB-C"
11+
],
12+
"images": [
13+
"waveshare_rp2350b_core.png"
14+
],
15+
"mcu": "rp2350",
16+
"product": "RP2350B Core",
17+
"thumbnail": "",
18+
"url": "https://www.waveshare.com/core2350b.htm",
19+
"variants": {
20+
"RISCV": "RISC V"
21+
},
22+
"vendor": "Waveshare"
23+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CMake file for Waveshare RP2350B Core
2+
3+
# The Core is powered by an RP2350B with 48 GPIOs
4+
set(PICO_NUM_GPIOS 48)
5+
6+
# The Waveshare boards don't have official pico-sdk support.
7+
# So, add this board directory to the header search path and define PICO_BOARD
8+
# which will instruct pico-sdk to look for waveshare_rp2350b_core.h
9+
list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
10+
set(PICO_BOARD "waveshare_rp2350b_core")
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Board and hardware specific configuration
2+
#define MICROPY_HW_BOARD_NAME "Waveshare RP2350B Core"
3+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
4+
#define MICROPY_HW_FLASH_STORAGE_BYTES (14 * 1024 * 1024)
5+
6+
#define MICROPY_HW_PSRAM_CS_PIN (47)
7+
#define MICROPY_HW_ENABLE_PSRAM (1)
8+
9+
// Override machine_uart.c definitions.
10+
// See waveshare_rp2350b.h and note that the PICO_DEFAULT_UART configuration
11+
// is not currently referenced in machine_uart.c.
12+
#define MICROPY_HW_UART0_TX (0)
13+
#define MICROPY_HW_UART0_RX (1)
14+
#define MICROPY_HW_UART0_CTS (-1)
15+
#define MICROPY_HW_UART0_RTS (-1)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the ARM-based RP2350 platform
2+
set(PICO_PLATFORM "rp2350")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the RISC-V-based RP2350 platform
2+
set(PICO_PLATFORM "rp2350-riscv")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LED,GPIO39
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#ifndef _BOARDS_WAVESHARE_RP2350B_CORE_COMMON_H
2+
#define _BOARDS_WAVESHARE_RP2350B_CORE_COMMON_H
3+
4+
// --- LED ---
5+
#ifndef PICO_DEFAULT_LED_PIN
6+
#define PICO_DEFAULT_LED_PIN 39
7+
#endif
8+
9+
// Note: Avoid using Pin 47 for any default peripheral since it can be used for
10+
// extra PSRAM/flash
11+
// NOTE that the PICO_DEFAULT_UART configuration
12+
// is not currently referenced in machine_uart.c.
13+
14+
// --- UART ---
15+
#ifndef PICO_DEFAULT_UART
16+
#define PICO_DEFAULT_UART 0
17+
#endif
18+
#ifndef PICO_DEFAULT_UART_TX_PIN
19+
#define PICO_DEFAULT_UART_TX_PIN 0
20+
#endif
21+
#ifndef PICO_DEFAULT_UART_RX_PIN
22+
#define PICO_DEFAULT_UART_RX_PIN 1
23+
#endif
24+
25+
// --- I2C ---
26+
#ifndef PICO_DEFAULT_I2C
27+
#define PICO_DEFAULT_I2C 0
28+
#endif
29+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
30+
#define PICO_DEFAULT_I2C_SDA_PIN 8
31+
#endif
32+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
33+
#define PICO_DEFAULT_I2C_SCL_PIN 9
34+
#endif
35+
36+
// --- SPI ---
37+
#ifndef PICO_DEFAULT_SPI
38+
#define PICO_DEFAULT_SPI 0
39+
#endif
40+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
41+
#define PICO_DEFAULT_SPI_SCK_PIN 18
42+
#endif
43+
#ifndef PICO_DEFAULT_SPI_TX_PIN
44+
#define PICO_DEFAULT_SPI_TX_PIN 19
45+
#endif
46+
#ifndef PICO_DEFAULT_SPI_RX_PIN
47+
#define PICO_DEFAULT_SPI_RX_PIN 16
48+
#endif
49+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
50+
#define PICO_DEFAULT_SPI_CSN_PIN 17
51+
#endif
52+
53+
// Flash configuration
54+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
55+
56+
#ifndef PICO_FLASH_SPI_CLKDIV
57+
#define PICO_FLASH_SPI_CLKDIV 2
58+
#endif
59+
60+
#endif

0 commit comments

Comments
 (0)