Skip to content

Commit 8e1e709

Browse files
authored
Add SparkFun IoT RedBoard RP2350 (#2836)
1 parent 46a58fb commit 8e1e709

File tree

8 files changed

+637
-0
lines changed

8 files changed

+637
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Read the [Contributing Guide](https://github.com/earlephilhower/arduino-pico/blo
9595
* Solder Party RP2040 Stamp
9696
* Solder Party RP2350 Stamp
9797
* Solder Party RP2350 Stamp XL
98+
* SparkFun IoT RedBoard RP2350
9899
* SparkFun MicroMod RP2040
99100
* SparkFun ProMicro RP2040
100101
* SparkFun ProMicro RP2350

boards.txt

+346
Large diffs are not rendered by default.

package/package_pico_index.template.json

+3
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@
293293
{
294294
"name": "Solder Party RP2350 Stamp XL"
295295
},
296+
{
297+
"name": "SparkFun IoT RedBoard RP2350"
298+
},
296299
{
297300
"name": "SparkFun MicroMod RP2040"
298301
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "none.S",
6+
"usb_vid": "0x1B4F",
7+
"usb_pid": "0x0047"
8+
}
9+
},
10+
"core": "earlephilhower",
11+
"cpu": "cortex-m33",
12+
"extra_flags": "-DARDUINO_SPARKFUN_IOTREDBOARD_RP2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 -DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1",
13+
"f_cpu": "150000000L",
14+
"hwids": [
15+
[
16+
"0x2E8A",
17+
"0x00C0"
18+
],
19+
[
20+
"0x1B4F",
21+
"0x0047"
22+
]
23+
],
24+
"mcu": "rp2350",
25+
"variant": "sparkfun_iotredboard_rp2350"
26+
},
27+
"debug": {
28+
"jlink_device": "RP2350_0",
29+
"openocd_target": "rp2350.cfg",
30+
"svd_path": "rp2350.svd"
31+
},
32+
"frameworks": [
33+
"arduino"
34+
],
35+
"name": "IoT RedBoard RP2350",
36+
"upload": {
37+
"maximum_ram_size": 524288,
38+
"maximum_size": 16777216,
39+
"require_upload_port": true,
40+
"native_usb": true,
41+
"use_1200bps_touch": true,
42+
"wait_for_upload_port": false,
43+
"protocol": "picotool",
44+
"protocols": [
45+
"blackmagic",
46+
"cmsis-dap",
47+
"jlink",
48+
"raspberrypi-swd",
49+
"picotool",
50+
"picoprobe"
51+
],
52+
"psram_length": 8388608
53+
},
54+
"url": "https://www.sparkfun.com/sparkfun-iot-redboard-rp2350.html",
55+
"vendor": "SparkFun"
56+
}

tools/makeboards.py

+1
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef
650650
MakeBoard("solderparty_rp2350_stamp_xl", "rp2350", "Solder Party", "RP2350 Stamp XL", "0x1209", "0xa184", 500, "SOLDERPARTY_RP2350_STAMP_XL", 16, 0, "none", None, "https://www.solder.party/docs/rp2350-stamp-xl/")
651651

652652
# SparkFun
653+
MakeBoard("sparkfun_iotredboard_rp2350", "rp2350", "SparkFun", "IoT RedBoard RP2350", "0x1b4f", "0x0047", 250, "SPARKFUN_IOTREDBOARD_RP2350", 16, 8, "none", ["PICO_CYW43_SUPPORTED=1", "CYW43_PIN_WL_DYNAMIC=1"], "https://www.sparkfun.com/sparkfun-iot-redboard-rp2350.html")
653654
MakeBoard("sparkfun_micromodrp2040", "rp2040", "SparkFun", "MicroMod RP2040", "0x1b4f", "0x0026", 250, "SPARKFUN_MICROMOD_RP2040", 16, 0, "boot2_w25q080_2_padded_checksum")
654655
MakeBoard("sparkfun_promicrorp2040", "rp2040", "SparkFun", "ProMicro RP2040", "0x1b4f", "0x0026", 250, "SPARKFUN_PROMICRO_RP2040", 16, 0, "boot2_generic_03h_4_padded_checksum")
655656
MakeBoard("sparkfun_promicrorp2350", "rp2350", "SparkFun", "ProMicro RP2350", "0x1b4f", "0x0026", 250, "SPARKFUN_PROMICRO_RP2350", 16, 8, "none")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
pinMode and digitalRead/Write for the Raspberry Pi Pico W RP2040
3+
Copyright (c) 2022 Earle F. Philhower, III <[email protected]>
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
#include "Arduino.h"
21+
#include <cyw43_wrappers.h>
22+
23+
extern "C" void pinMode(pin_size_t pin, PinMode mode) {
24+
cyw43_pinMode(pin, mode);
25+
}
26+
27+
extern "C" void digitalWrite(pin_size_t pin, PinStatus val) {
28+
cyw43_digitalWrite(pin, val);
29+
}
30+
31+
extern "C" PinStatus digitalRead(pin_size_t pin) {
32+
return cyw43_digitalRead(pin);
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
Initialize the Pico W WiFi driver
3+
4+
Copyright (c) 2022 Earle F. Philhower, III <[email protected]>
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*/
20+
21+
#include <cyw43_wrappers.h>
22+
#include "pico/cyw43_driver.h"
23+
24+
extern "C" void initVariant() {
25+
static uint cyw43_pin_array[CYW43_PIN_INDEX_WL_COUNT] = {24, 38, 38, 38, 37, 36};
26+
cyw43_set_pins_wl(cyw43_pin_array);
27+
init_cyw43_wifi();
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
#pragma once
2+
3+
#include <stdint.h>
4+
#include <cyw43_wrappers.h>
5+
6+
#define PICO_RP2350B 1
7+
#define PICO_RP2350A 0
8+
9+
#define PINS_COUNT (48u)
10+
#define NUM_DIGITAL_PINS (48u)
11+
#define NUM_ANALOG_INPUTS (7u)
12+
#define NUM_ANALOG_OUTPUTS (0u)
13+
#define ADC_RESOLUTION (12u)
14+
15+
// LEDs
16+
#define PIN_LED (25u)
17+
#define LED_BUILTIN PIN_LED
18+
19+
#define PIN_WL_LED (64u)
20+
21+
#define PIN_NEOPIXEL (3u)
22+
#define NUM_NEOPIXEL (1u)
23+
24+
// Serial
25+
#define PIN_SERIAL1_TX (0u)
26+
#define PIN_SERIAL1_RX (1u)
27+
28+
#define PIN_SERIAL2_TX (40u)
29+
#define PIN_SERIAL2_RX (41u)
30+
31+
// External SPI
32+
#define PIN_SPI0_MISO (20u)
33+
#define PIN_SPI0_MOSI (23u)
34+
#define PIN_SPI0_SCK (22u)
35+
#define PIN_SPI0_SS (21u) // CS pin for External SPI.
36+
37+
#define PIN_SPI0_POCI PIN_SPI0_MISO
38+
#define PIN_SPI0_PICO PIN_SPI0_MOSI
39+
#define PIN_SPI0_CS PIN_SPI0_SS
40+
41+
// SD Card SPI
42+
#define PIN_SPI1_MISO (8u)
43+
#define PIN_SPI1_MOSI (11u)
44+
#define PIN_SPI1_SCK (10u)
45+
#define PIN_SPI1_SS (9u) // CS pin for SD card.
46+
47+
#define PIN_SPI1_POCI PIN_SPI1_MISO
48+
#define PIN_SPI1_PICO PIN_SPI1_MOSI
49+
#define PIN_SPI1_CS PIN_SPI1_SS
50+
51+
// Wire
52+
#define PIN_WIRE0_SDA (4u)
53+
#define PIN_WIRE0_SCL (5u)
54+
55+
#define PIN_WIRE1_SDA (30u)
56+
#define PIN_WIRE1_SCL (31u)
57+
58+
#define SERIAL_HOWMANY (3u)
59+
#define SPI_HOWMANY (2u)
60+
#define WIRE_HOWMANY (2u)
61+
#define WIRE_INTERFACES_COUNT (WIRE_HOWMANY)
62+
63+
// PSRAM
64+
#define RP2350_PSRAM_CS (47u)
65+
#define RP2350_PSRAM_MAX_SCK_HZ (109*1000*1000)
66+
67+
/* Pin mappings for marked pins on the board */
68+
// UART0
69+
static const uint8_t D0 = (0u);
70+
static const uint8_t D1 = (1u);
71+
72+
// I2C0
73+
static const uint8_t D4 = (4u);
74+
static const uint8_t D5 = (5u);
75+
76+
// SD Card/SPI1
77+
static const uint8_t D8 = (8u);
78+
static const uint8_t D9 = (9u);
79+
static const uint8_t D10 = (10u);
80+
static const uint8_t D11 = (11u);
81+
82+
// HSTX GPIO
83+
static const uint8_t D12 = (12u);
84+
static const uint8_t D13 = (13u);
85+
static const uint8_t D14 = (14u);
86+
static const uint8_t D15 = (15u);
87+
static const uint8_t D16 = (16u);
88+
static const uint8_t D17 = (17u);
89+
static const uint8_t D18 = (18u);
90+
static const uint8_t D19 = (19u);
91+
92+
// SPI0
93+
static const uint8_t D20 = (20u);
94+
static const uint8_t D21 = (21u);
95+
static const uint8_t D22 = (22u);
96+
static const uint8_t D23 = (23u);
97+
98+
// External GPIO
99+
static const uint8_t D28 = (28u);
100+
static const uint8_t D29 = (29u);
101+
static const uint8_t D30 = (30u);
102+
static const uint8_t D31 = (31u);
103+
static const uint8_t D32 = (32u);
104+
static const uint8_t D33 = (33u);
105+
static const uint8_t D34 = (34u);
106+
static const uint8_t D35 = (35u);
107+
108+
// Analog Inputs are also digital capable.
109+
static const uint8_t D40 = (40u);
110+
static const uint8_t D41 = (41u);
111+
static const uint8_t D42 = (42u);
112+
static const uint8_t D43 = (43u);
113+
static const uint8_t D44 = (44u);
114+
static const uint8_t D45 = (45u);
115+
116+
static const uint8_t A0 = (40u);
117+
static const uint8_t A1 = (41u);
118+
static const uint8_t A2 = (42u);
119+
static const uint8_t A3 = (43u);
120+
static const uint8_t A4 = (44u);
121+
static const uint8_t A5 = (45u);
122+
123+
// SD Card detect - Active Low
124+
static const uint8_t SD_DET_N = (2u);
125+
126+
// RGB LED data pin
127+
static const uint8_t RGB_LED = (3u);
128+
129+
// Low battery alert - Active Low
130+
static const uint8_t BATT_ALRT_N = (6u);
131+
132+
// Power enable for peripherals - qwiic, sd, rgb. Default HIGH via HW jumper.
133+
static const uint8_t PERIPHERAL_POWER_ENABLE = (7u);
134+
135+
// WiFi power GPIO
136+
static const uint8_t WRL_ON = (24u);
137+
138+
// aka STAT LED
139+
static const uint8_t D25 = (25u);
140+
141+
// Power status inputs
142+
static const uint8_t POWER_SRC_5V = (26u);
143+
static const uint8_t BATT_POWER = (27u);
144+
145+
// User button
146+
static const uint8_t USER_SW = (39u);
147+
148+
// Input voltage measurement
149+
static const uint8_t VIN_MEAS = (46u);
150+
151+
static const uint8_t SS = PIN_SPI0_SS;
152+
static const uint8_t CS = PIN_SPI0_CS;
153+
154+
static const uint8_t MOSI = PIN_SPI0_MOSI;
155+
static const uint8_t PICO = PIN_SPI0_PICO;
156+
157+
static const uint8_t MISO = PIN_SPI0_MISO;
158+
static const uint8_t POCI = PIN_SPI0_POCI;
159+
160+
static const uint8_t SCK = PIN_SPI0_SCK;
161+
162+
static const uint8_t SDA = PIN_WIRE0_SDA;
163+
static const uint8_t SCL = PIN_WIRE0_SCL;
164+
165+
static const uint8_t SDA1 = PIN_WIRE1_SDA;
166+
static const uint8_t SCL1 = PIN_WIRE1_SCL;
167+
168+
static const uint8_t RX = PIN_SERIAL1_RX;
169+
static const uint8_t TX = PIN_SERIAL1_TX;

0 commit comments

Comments
 (0)