Skip to content

Commit a78c194

Browse files
committed
fix(board): update Kode Dot variant pin mapping and OPI flash
1 parent 956bc3e commit a78c194

File tree

2 files changed

+27
-36
lines changed

2 files changed

+27
-36
lines changed

boards.txt

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51760,13 +51760,14 @@ kodedot.build.dfu_on_boot=0
5176051760
kodedot.build.f_cpu=240000000L
5176151761

5176251762
kodedot.build.flash_offset=0x400000
51763-
kodedot.build.flash_size=16MB
51763+
kodedot.build.flash_size=32MB
5176451764
kodedot.build.flash_freq=80m
5176551765
kodedot.build.flash_mode=dio
51766+
kodedot.build.psram_type=opi
5176651767

5176751768
kodedot.build.custom_partitions=kodedot_partitions
5176851769

51769-
kodedot.build.psram_type=qspi
51770+
kodedot.build.psram_type=opi
5177051771
kodedot.build.defines=
5177151772

5177251773
kodedot.build.loop_core=-DARDUINO_RUNNING_CORE=1
@@ -51777,19 +51778,6 @@ kodedot.recipe.hooks.objcopy.postobjcopy.3.pattern_args=
5177751778

5177851779
kodedot.recipe.output.save_file={build.project_name}.ino.bin
5177951780

51780-
kodedot.menu.DebugLevel.none=None
51781-
kodedot.menu.DebugLevel.none.build.code_debug=0
51782-
kodedot.menu.DebugLevel.error=Error
51783-
kodedot.menu.DebugLevel.error.build.code_debug=1
51784-
kodedot.menu.DebugLevel.warn=Warn
51785-
kodedot.menu.DebugLevel.warn.build.code_debug=2
51786-
kodedot.menu.DebugLevel.info=Info
51787-
kodedot.menu.DebugLevel.info.build.code_debug=3
51788-
kodedot.menu.DebugLevel.debug=Debug
51789-
kodedot.menu.DebugLevel.debug.build.code_debug=4
51790-
kodedot.menu.DebugLevel.verbose=Verbose
51791-
kodedot.menu.DebugLevel.verbose.build.code_debug=5
51792-
5179351781
##############################################################
5179451782

5179551783
# FED4 Board

variants/kodedot/pins_arduino.h

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
22
────────────────────────────────────────────────────────────────────────
3-
KodeDot – ESP32-S3R8 Variant
3+
KodeDot – ESP32-S3R8 Variant (rev. with OPI flash/PSRAM)
44
Pin definition file for the Arduino-ESP32 core
55
────────────────────────────────────────────────────────────────────────
66
* External 2 × 10 connector → simple aliases PIN1 … PIN20
77
* On-board QSPI LCD 410×502 @40 MHz (SPI3_HOST)
8-
* micro-SD on SPI2_HOST
8+
* micro-SD on SDMMC (1-bit)
99
* Dual-I²C: external (GPIO37/36) + internal-sensors (GPIO48/47)
1010
* USB VID/PID 0x303A:0x1001
1111
*/
@@ -33,13 +33,12 @@ static const uint8_t SDA = 36; // GPIO36 – PIN14
3333
#define INT_I2C_SCL 47 // GPIO47
3434
#define INT_I2C_SDA 48 // GPIO48
3535

36-
/*──────────────── SPI2 – micro-SD ───────────────────────*/
37-
static const uint8_t SS = 15; // SD_CS
38-
static const uint8_t MOSI = 16; // SD_MOSI
39-
static const uint8_t MISO = 18; // SD_MISO
40-
static const uint8_t SCK = 17; // SD_CLK
41-
#define BOARD_HAS_SD_SPI
42-
#define SD_CS SS
36+
/*──────────────── SDMMC – micro-SD (1-bit) ───────────────*/
37+
#define BOARD_HAS_SD_SDMMC
38+
#define SDMMC_CMD 5 // SD_CMD
39+
#define SDMMC_CLK 6 // SD_CLK
40+
#define SDMMC_D0 7 // SD_D0
41+
#define SD_CS -1 // No CS pin in SDMMC mode
4342

4443
/*──────────────── QSPI LCD (SPI3_HOST) ─────────────────–
4544
* Controller: ST7789 / 4-line SPI (no D/C pin)
@@ -52,16 +51,14 @@ static const uint8_t SCK = 17; // SD_CLK
5251
#define LCD_HEIGHT 502
5352

5453
#define LCD_HOST SPI3_HOST
55-
#define LCD_SCK 35 // GPIO35 • QSPI_CLK
56-
#define LCD_MOSI 33 // GPIO33 • QSPI_IO0 (D0)
57-
#define LCD_IO1 34 // GPIO34 • QSPI_IO1 (D1)
58-
#define LCD_IO2 37 // GPIO37 • QSPI_IO2 (D2)
59-
#define LCD_IO3 36 // GPIO36 • QSPI_IO3 (D3)
60-
#define LCD_CS 10 // GPIO10
61-
#define LCD_RST 9 // GPIO09
54+
#define LCD_SCK 17 // GPIO17 • QSPI_CLK
55+
#define LCD_MOSI 15 // GPIO15 • QSPI_IO0 (D0)
56+
#define LCD_IO1 14 // GPIO14 • QSPI_IO1 (D1)
57+
#define LCD_IO2 16 // GPIO16 • QSPI_IO2 (D2)
58+
#define LCD_IO3 10 // GPIO10 • QSPI_IO3 (D3)
59+
#define LCD_CS 9 // GPIO09
60+
#define LCD_RST 8 // GPIO08
6261
#define LCD_DC -1 // not used in 4-line SPI
63-
/* Optional: back-light enable shares the NeoPixel pin */
64-
#define LCD_BL 5 // GPIO05 (same as NEOPIXEL)
6562

6663
/*──────────────── Analog / Touch pads ────────────────*/
6764
static const uint8_t A0 = 11; // PIN4 – GPIO11 / TOUCH11 / ADC2_CH0
@@ -71,9 +68,9 @@ static const uint8_t A3 = 14; // PIN10 – GPIO14 / TOUCH14 / ADC2_CH3
7168
static const uint8_t T0 = A0, T1 = A1, T2 = A2, T3 = A3;
7269

7370
/*──────────────── On-board controls & indicator ─────────*/
74-
#define BUTTON_TOP 0 // GPIO00 – BOOT • active-LOW
75-
#define BUTTON_BOTTOM 6 // GPIO06 • active-LOW
76-
#define NEOPIXEL_PIN 5 // GPIO05 – WS2812
71+
#define BUTTON_TOP 0 // GPIO00 – BOOT • active-LOW
72+
#define BUTTON_BOTTOM -1 // via IO expander • no direct GPIO
73+
#define NEOPIXEL_PIN 4 // GPIO04 – WS2812
7774
#define LED_BUILTIN NEOPIXEL_PIN
7875

7976
/*──────────────── JTAG (also on connector) ──────────────*/
@@ -104,4 +101,10 @@ static const uint8_t T0 = A0, T1 = A1, T2 = A2, T3 = A3;
104101
/* PIN1, PIN2, PIN19, PIN20 are power/ground and deliberately
105102
left undefined – they are **not** usable as GPIO. */
106103

104+
/* ==== Default SPI pins for library compatibility ==== */
105+
#define SCK 17 // LCD_SCK • QSPI_CLK
106+
#define MISO -1 // No MISO available in this design
107+
#define MOSI 15 // LCD_MOSI • QSPI_IO0
108+
#define SS 9 // LCD_CS
109+
107110
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)