Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
397 changes: 397 additions & 0 deletions boards.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package/package_pico_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@
{
"name": "Waveshare RP2350 Plus"
},
{
"name": "Waveshare RP2350B Plus W"
},
{
"name": "Waveshare RP2350 LCD 0.96"
},
Expand Down
56 changes: 56 additions & 0 deletions tools/json/waveshare_rp2350b_plus_w.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "none.S",
"usb_vid": "0x2E8A",
"usb_pid": "0xF00A"
}
},
"core": "earlephilhower",
"cpu": "cortex-m33",
"extra_flags": "-DARDUINO_WAVESHARE_RP2350B_PLUS_W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 -DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1",
"f_cpu": "150000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0xF00A"
]
],
"mcu": "rp2350",
"variant": "waveshare_rp2350b_plus_w"
},
"debug": {
"jlink_device": "RP2350_M33_0",
"openocd_target": "rp2350.cfg",
"svd_path": "rp2350.svd"
},
"frameworks": [
"arduino",
"picosdk"
],
"name": "RP2350B Plus W",
"upload": {
"maximum_ram_size": 524288,
"maximum_size": 16777216,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Waveshare"
}
8 changes: 6 additions & 2 deletions tools/makeboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
elif name == "olimex_rp2040pico30":
BuildFlashMenu(name, chip, 2*1024*1024, [*smallfs, 1024 * 1024])
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
elif (name == "challenger_2350_wifi6_ble5") or (name == "challenger_2040_wifi_ble"):
elif (name == "challenger_2350_wifi6_ble5") or (name == "challenger_2040_wifi_ble"):
BuildWifiType(name)
BuildCountry(name)
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
Expand All @@ -363,6 +363,9 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
elif name == "waveshare_rp2350_plus":
BuildFlashMenu(name, chip, 4*1024*1024, [*smallfs, 1024*1024, 2*1024*1024, 3*1024*1024])
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
elif name == "waveshare_rp2350b_plus_w":
BuildFlashMenu(name, chip, 4*1024*1024, [*smallfs, 1024*1024, 2*1024*1024, 3*1024*1024])
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
else:
BuildFlashMenu(name, chip, flashsizemb * 1024 * 1024, fssizelist)
if (chip == "rp2350") or (chip == "rp2350-riscv"):
Expand Down Expand Up @@ -391,7 +394,7 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
BuildDebugPort(name)
BuildDebugLevel(name)
BuildUSBStack(name)
if name in ["rpipicow", "rpipico2w", "pimoroni_pico_plus_2w", "sparkfun_thingplusrp2350"]:
if name in ["rpipicow", "rpipico2w", "pimoroni_pico_plus_2w", "sparkfun_thingplusrp2350", "waveshare_rp2350b_plus_w"]:
BuildCountry(name)
BuildIPBTStack(name)
if name == "generic":
Expand Down Expand Up @@ -725,6 +728,7 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef
MakeBoard("waveshare_rp2350_zero", "rp2350", "Waveshare", "RP2350 Zero", "0x2e8a", "0x10B0", 500, "WAVESHARE_RP2350_ZERO", 4, 0, "none")
MakeBoard("waveshare_rp2350_pizero", "rp2350", "Waveshare", "RP2350 PiZero", "0x2e8a", "0x000F", 500, "WAVESHARE_RP2350_PIZERO", 16, 0, "none")
MakeBoard("waveshare_rp2350_plus", "rp2350", "Waveshare", "RP2350 Plus", "0x2e8a", "0x10B1", 500, "WAVESHARE_RP2350_PLUS", 4, 0, "none")
MakeBoard("waveshare_rp2350b_plus_w", "rp2350", "Waveshare", "RP2350B Plus W", "0x2e8a", "0xf00a", 500, "WAVESHARE_RP2350B_PLUS_W", 16, 0, "none", ["PICO_CYW43_SUPPORTED=1", "CYW43_PIN_WL_DYNAMIC=1"])
MakeBoard("waveshare_rp2350_lcd_0_96", "rp2350", "Waveshare", "RP2350 LCD 0.96", "0x2e8a", "0x10B7", 500, "WAVESHARE_RP2350_LCD_0_96", 4, 0, "none")

# WIZnet
Expand Down
47 changes: 47 additions & 0 deletions variants/waveshare_rp2350b_plus_w/digital.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
pinMode and digitalRead/Write for the Raspberry Pi Pico W RP2040
Copyright (c) 2022 Earle F. Philhower, III <[email protected]>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

// https://datasheets.raspberrypi.com/rm2/rm2-datasheet.pdf
// https://datasheets.raspberrypi.com/rm2/rm2-product-brief.pdf
// https://pip.raspberrypi.com/categories/1223-design-files
// NOTE: LED1: LED_WLGP0 B1_GPIO0

/*
Radio Module 2 packages the same Infineon CYW43439 radio used on Raspberry
Pi Pico W and Pico 2 W, featuring 1×1 single-band 2.4GHz Wi-Fi® 4 (802.11n)
and Bluetooth® 5.2, with support for both Bluetooth Classic and Bluetooth
Low Energy. Its integrated internal PA, LNA, and T/R switch deliver
excellent wireless performance even when sharing a single antenna between
Wi-Fi and Bluetooth.
* */

#include "Arduino.h"
#include <cyw43_wrappers.h>

extern "C" void pinMode(pin_size_t pin, PinMode mode) {
cyw43_pinMode(pin, mode);
}

extern "C" void digitalWrite(pin_size_t pin, PinStatus val) {
cyw43_digitalWrite(pin, val);
}

extern "C" PinStatus digitalRead(pin_size_t pin) {
return cyw43_digitalRead(pin);
}
25 changes: 25 additions & 0 deletions variants/waveshare_rp2350b_plus_w/init.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Initialize the Pico W WiFi driver

Copyright (c) 2022 Earle F. Philhower, III <[email protected]>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <cyw43_wrappers.h>

extern "C" void initVariant() {
init_cyw43_wifi();
}
187 changes: 187 additions & 0 deletions variants/waveshare_rp2350b_plus_w/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
#pragma once

#include <stdint.h>

#include <cyw43_wrappers.h>

// Waveshare RP2350 Plus W
// Pin definitionsL:
// https://www.waveshare.com/wiki/RP2350B-Plus-W
// https://files.waveshare.com/wiki/RP2350B-Plus-W/RP2350B-Plus-W.pdf
// https://www.waveshare.com/w/upload/4/41/RP2350B-Plus-W-details-inter.png

// NOTE: LED2: GPIO23
// NOTE: LED1: LED_WLGP0 B1_GPIO0 (Raspberry Pi Radio Module 2 / RMC20452T)

// Raspberry Pi Radio Module 2 / RMC20452T
// https://datasheets.raspberrypi.com/rm2/rm2-datasheet.pdf
// https://datasheets.raspberrypi.com/rm2/rm2-product-brief.pdf
// https://pip.raspberrypi.com/categories/1223-design-files
/*
Pin# Pin#
___(_____)___
GPIO0 1 | *USB C* | 40 VBUS
GPIO1 2 | | 39 VSYS
GND 3 | | 38 GND
GPIO2 4 | | 37 3V3_EN
GPIO3 5 | | 36 3V3(OUT)
GPIO4 6 | | 35 ADC_VREF
GPIO5 7 | | 34 GPIO42
GND 8 | | 33 GND
GPIO6 9 | | 32 GPIO41
GPIO7 10 | | 31 GPIO40
GPIO8 11 | | 30 RUN
GPIO9 12 | | 29 GPIO22
GND 13 | | 28 GND
GPIO10 14 | | 27 GPIO21
GPIO11 15 | | 25 GPIO20
GPIO12 16 | | 25 GPIO19
GPIO13 17 | | 24 GPIO18
GND 18 | |_|_|_|_| | 23 GND
GPIO14 19 | |_|_|_|_| | 22 GPIO17
GPIO15 20 |__|_|_|_|_|__| 21 GPIO16

43|33|30|27|24
--|--|--|--|--
44|34|31|28|25
--|--|--|--|--
45|35|32|29|26

43 GPIO43 | 33 GPIO33 | 30 GPIO30 | 27 GPIO27 | 24 GPIO24
44 GPIO44 | 34 GPIO34 | 31 GPIO31 | 28 GPIO28 | 25 GPIO25
45 GPIO45 | 35 GPIO35 | 32 GPIO32 | 29 GPIO29 | 26 GPIO26

"no debug" is written on the schematic for the main connectors,
but SWCLK and SWDIO are probably still accessible on these pads:
33 - SWCLK
34 - SWDIO
*/

#define PICO_RP2350A 0 // RP2350B

#define PINS_COUNT (46u)
#define NUM_DIGITAL_PINS (46u)
#define NUM_ANALOG_INPUTS (7u)
#define NUM_ANALOG_OUTPUTS (0u)
#define ADC_RESOLUTION (12u)

// LED_BUILTIN
#define LED_BUILTIN PIN_LED
#define PIN_LED (64u) // LED1 uses the Raspberry Pi Radio Module 2 ("B1_GPIO0")

// Serial
#define PIN_SERIAL1_TX (0u)
#define PIN_SERIAL1_RX (1u)

#define PIN_SERIAL2_TX (8u)
#define PIN_SERIAL2_RX (9u)

// SPI
#define PIN_SPI0_MISO (16u)
#define PIN_SPI0_MOSI (19u)
#define PIN_SPI0_SCK (18u)
#define PIN_SPI0_SS (17u)

#define PIN_SPI1_MISO (12u)
#define PIN_SPI1_MOSI (15u)
#define PIN_SPI1_SCK (14u)
#define PIN_SPI1_SS (13u)

// Wire
#define PIN_WIRE0_SDA (8u)
#define PIN_WIRE0_SCL (9u)

#define PIN_WIRE1_SDA (6u)
#define PIN_WIRE1_SCL (7u)

#define SERIAL_HOWMANY (3u)
#define SPI_HOWMANY (2u)
#define WIRE_HOWMANY (2u)

// PSRAM
// NOTE: does not come with a PSRAM chip
#define RP2350_PSRAM_CS (47u)
// #define RP2350_PSRAM_MAX_SCK_HZ (109*1000*1000)

// DVI
#define PIN_CKN (15u)
#define PIN_CKP (14u)
#define PIN_D0N (13u)
#define PIN_D0P (12u)
#define PIN_D1N (19u)
#define PIN_D1P (18u)
#define PIN_D2N (17u)
#define PIN_D2P (16u)

// SPI
static const uint8_t SS = PIN_SPI0_SS;
static const uint8_t MOSI = PIN_SPI0_MOSI;
static const uint8_t MISO = PIN_SPI0_MISO;
static const uint8_t SCK = PIN_SPI0_SCK;

// Wire
static const uint8_t SDA = PIN_WIRE0_SDA;
static const uint8_t SCL = PIN_WIRE0_SCL;

static const uint8_t RX = PIN_SERIAL1_RX;
static const uint8_t TX = PIN_SERIAL1_TX;

/* Pins mappings for marked pins on the board */
// Digital
static const uint8_t D0 = (0u);
static const uint8_t D1 = (1u);
static const uint8_t D2 = (2u);
static const uint8_t D3 = (3u);
static const uint8_t D4 = (4u);
static const uint8_t D5 = (5u);
static const uint8_t D6 = (6u);
static const uint8_t D7 = (7u);
static const uint8_t D8 = (8u);
static const uint8_t D9 = (9u);
static const uint8_t D10 = (10u);
static const uint8_t D11 = (11u);
static const uint8_t D12 = (12u);
static const uint8_t D13 = (13u);
static const uint8_t D14 = (14u);
static const uint8_t D15 = (15u);
static const uint8_t D16 = (16u);
static const uint8_t D17 = (17u);
static const uint8_t D18 = (18u);
static const uint8_t D19 = (19u);
static const uint8_t D20 = (20u);
static const uint8_t D21 = (21u);
static const uint8_t D22 = (22u);
// These pins are still on the headers; will probably be used more than the
// ones broken out onto the bare pads.
static const uint8_t D23 = (40u);
static const uint8_t D24 = (41u);
static const uint8_t D25 = (42u);

/* Pin mappings for the pads; NOTE: P = "pad" */
static const uint8_t D26 = (24u); // GPIO24 = P1
static const uint8_t D27 = (25u); // GPIO25 = P3
static const uint8_t D28 = (26u); // GPIO26 = P5
static const uint8_t D29 = (27u); // GPIO27 = P7
static const uint8_t D30 = (28u); // GPIO28 = P9
static const uint8_t D31 = (29u); // GPIO29 = P11
static const uint8_t D32 = (30u); // GPIO30 = P13
static const uint8_t D33 = (31u); // GPIO31 = P15
static const uint8_t D34 = (32u); // GPIO32 = P2
static const uint8_t D35 = (33u); // GPIO33 = P4
static const uint8_t D36 = (34u); // GPIO34 = P6
static const uint8_t D37 = (35u); // GPIO35 = P8

/* Pins connected to the Raspberry Pi Radio Module 2 */
// GPIO36 = WL_ON
// GPIO37 = WL_D
// GPIO38 = WL_CS
// GPIO39 = WL_CLK

// Analog
static const uint8_t A0 = (40u); // ADC0 = GPIO40
static const uint8_t A1 = (41u); // ADC1 = GPIO41`
static const uint8_t A2 = (42u); // ADC2 = GPIO42
static const uint8_t A3 = (43u); // ADC3 = GPIO43
static const uint8_t A4 = (44u); // ADC4 = GPIO44
static const uint8_t A5 = (45u); // ADC5 = GPIO45
static const uint8_t A6 = (46u); // ADC6 = GPIO46 / VSYS_SENSE