Skip to content

Commit 35ad086

Browse files
committed
Add board header for Waveshare Core2350B (PSRAM 0MB (Core2350B0) / 2MB (Core2350B1) / 8MB (Core2350B2)).
1 parent 891748c commit 35ad086

1 file changed

Lines changed: 106 additions & 0 deletions

File tree

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
// -----------------------------------------------------
8+
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
9+
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
10+
// -----------------------------------------------------
11+
12+
// This header may be included by other board headers as "boards/waveshare_core2350b.h"
13+
14+
#ifndef _BOARDS_WAVESHARE_CORE2350B_H
15+
#define _BOARDS_WAVESHARE_CORE2350B_H
16+
17+
pico_board_cmake_set(PICO_PLATFORM, rp2350)
18+
19+
// For board detection
20+
#define WAVESHARE_CORE2350B
21+
22+
// --- RP2350 VARIANT ---
23+
#define PICO_RP2350A 0
24+
25+
// --- BOARD SPECIFIC ---
26+
#define WAVESHARE_CORE2350B_PSRAM_CS_PIN 47
27+
28+
// --- UART ---
29+
#ifndef PICO_DEFAULT_UART
30+
#define PICO_DEFAULT_UART 0
31+
#endif
32+
#ifndef PICO_DEFAULT_UART_TX_PIN
33+
#define PICO_DEFAULT_UART_TX_PIN 0
34+
#endif
35+
#ifndef PICO_DEFAULT_UART_RX_PIN
36+
#define PICO_DEFAULT_UART_RX_PIN 1
37+
#endif
38+
39+
// --- LED ---
40+
#ifndef PICO_DEFAULT_LED_PIN
41+
#define PICO_DEFAULT_LED_PIN 39
42+
#endif
43+
// no PICO_DEFAULT_WS2812_PIN
44+
45+
// --- I2C ---
46+
#ifndef PICO_DEFAULT_I2C
47+
#define PICO_DEFAULT_I2C 0
48+
#endif
49+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
50+
#define PICO_DEFAULT_I2C_SDA_PIN 4
51+
#endif
52+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
53+
#define PICO_DEFAULT_I2C_SCL_PIN 5
54+
#endif
55+
56+
// --- SPI ---
57+
#ifndef PICO_DEFAULT_SPI
58+
#define PICO_DEFAULT_SPI 0
59+
#endif
60+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
61+
#define PICO_DEFAULT_SPI_SCK_PIN 18
62+
#endif
63+
#ifndef PICO_DEFAULT_SPI_TX_PIN
64+
#define PICO_DEFAULT_SPI_TX_PIN 19
65+
#endif
66+
#ifndef PICO_DEFAULT_SPI_RX_PIN
67+
#define PICO_DEFAULT_SPI_RX_PIN 16
68+
#endif
69+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
70+
#define PICO_DEFAULT_SPI_CSN_PIN 17
71+
#endif
72+
73+
// --- FLASH ---
74+
75+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
76+
77+
#ifndef PICO_FLASH_SPI_CLKDIV
78+
#define PICO_FLASH_SPI_CLKDIV 2
79+
#endif
80+
81+
pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024))
82+
#ifndef PICO_FLASH_SIZE_BYTES
83+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
84+
#endif
85+
86+
// --- PSRAM ---
87+
#ifndef PICO_PSRAM_CS_PIN
88+
#define PICO_PSRAM_CS_PIN WAVESHARE_CORE2350B_PSRAM_CS_PIN
89+
#endif
90+
91+
// Auto-detect None/2MB/8MB variant
92+
#ifndef PICO_AUTO_DETECT_PSRAM_SIZE
93+
#define PICO_AUTO_DETECT_PSRAM_SIZE 1
94+
#endif
95+
96+
97+
// no PICO_SMPS_MODE_PIN
98+
// no PICO_VBUS_PIN
99+
// no PICO_VSYS_PIN
100+
101+
pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1)
102+
#ifndef PICO_RP2350_A2_SUPPORTED
103+
#define PICO_RP2350_A2_SUPPORTED 1
104+
#endif
105+
106+
#endif

0 commit comments

Comments
 (0)