Skip to content

Commit 8df4942

Browse files
authored
Merge pull request #9530 from djairjr/seeed_xiao_esp32s3
Config that works on Seeed Xiao ESP32S3
2 parents 7cfd0fe + 7076db0 commit 8df4942

File tree

5 files changed

+152
-0
lines changed

5 files changed

+152
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "supervisor/board.h"
8+
#include "mpconfigboard.h"
9+
#include "esp_log.h"
10+
#include "esp_err.h"
11+
#include "driver/i2c.h"
12+
13+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
// Micropython setup
8+
9+
#define MICROPY_HW_BOARD_NAME "Seeed Xiao ESP32-S3 Sense"
10+
#define MICROPY_HW_MCU_NAME "ESP32S3"
11+
12+
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
13+
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
14+
15+
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO7)
16+
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO9)
17+
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO8)
18+
19+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO6)
20+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO5)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
USB_VID = 0x2886
2+
USB_PID = 0x8056
3+
4+
USB_PRODUCT = "Seeed Xiao ESP32-S3 Sense"
5+
USB_MANUFACTURER = "Seeed Studio"
6+
7+
IDF_TARGET = esp32s3
8+
9+
CIRCUITPY_ESP_FLASH_MODE = qio
10+
CIRCUITPY_ESP_FLASH_SIZE = 8MB
11+
CIRCUITPY_ESP_FLASH_FREQ = 80m
12+
13+
CIRCUITPY_ESP_PSRAM_MODE = opi
14+
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
15+
CIRCUITPY_ESP_PSRAM_FREQ = 80m
16+
17+
CIRCUITPY_ESPCAMERA = 1
18+
CIRCUITPY_AUDIOBUSIO = 1
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "py/objtuple.h"
8+
#include "shared-bindings/board/__init__.h"
9+
#include "shared-module/displayio/__init__.h"
10+
11+
CIRCUITPY_BOARD_BUS_SINGLETON(sscb_i2c, i2c, 2)
12+
13+
static const mp_rom_obj_tuple_t camera_data_tuple = {
14+
// The order matters.
15+
// They must be ordered from low to high (CAM_D0, CAM_D1...CAM_D7).
16+
17+
// Do not include any of the control pins in here.
18+
{&mp_type_tuple},
19+
8,
20+
{
21+
MP_ROM_PTR(&pin_GPIO15),
22+
MP_ROM_PTR(&pin_GPIO17),
23+
MP_ROM_PTR(&pin_GPIO18),
24+
MP_ROM_PTR(&pin_GPIO16),
25+
MP_ROM_PTR(&pin_GPIO14),
26+
MP_ROM_PTR(&pin_GPIO12),
27+
MP_ROM_PTR(&pin_GPIO11),
28+
MP_ROM_PTR(&pin_GPIO48),
29+
}
30+
};
31+
32+
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
33+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
34+
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO1) },
35+
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO2) },
36+
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO3) },
37+
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO4) },
38+
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO5) },
39+
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) },
40+
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO1) },
41+
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO2) },
42+
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO3) },
43+
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO4) },
44+
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO5) },
45+
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO6) },
46+
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO43) },
47+
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO44) },
48+
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO7) },
49+
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO8) },
50+
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO9) },
51+
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) },
52+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO5) },
53+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) },
54+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
55+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
56+
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO9) },
57+
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO8) },
58+
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO7) },
59+
{ MP_ROM_QSTR(MP_QSTR_SDCS), MP_ROM_PTR(&pin_GPIO21) },
60+
{ MP_ROM_QSTR(MP_QSTR_CAM_DATA), MP_ROM_PTR(&camera_data_tuple) },
61+
{ MP_ROM_QSTR(MP_QSTR_CAM_D0), MP_ROM_PTR(&pin_GPIO15) },
62+
{ MP_ROM_QSTR(MP_QSTR_CAM_D1), MP_ROM_PTR(&pin_GPIO17) },
63+
{ MP_ROM_QSTR(MP_QSTR_CAM_D2), MP_ROM_PTR(&pin_GPIO18) },
64+
{ MP_ROM_QSTR(MP_QSTR_CAM_D3), MP_ROM_PTR(&pin_GPIO16) },
65+
{ MP_ROM_QSTR(MP_QSTR_CAM_D4), MP_ROM_PTR(&pin_GPIO14) },
66+
{ MP_ROM_QSTR(MP_QSTR_CAM_D5), MP_ROM_PTR(&pin_GPIO12) },
67+
{ MP_ROM_QSTR(MP_QSTR_CAM_D6), MP_ROM_PTR(&pin_GPIO11) },
68+
{ MP_ROM_QSTR(MP_QSTR_CAM_D7), MP_ROM_PTR(&pin_GPIO48) },
69+
{ MP_ROM_QSTR(MP_QSTR_CAM_XCLK), MP_ROM_PTR(&pin_GPIO10) },
70+
{ MP_ROM_QSTR(MP_QSTR_CAM_HREF), MP_ROM_PTR(&pin_GPIO47) },
71+
{ MP_ROM_QSTR(MP_QSTR_CAM_PCLK), MP_ROM_PTR(&pin_GPIO13) },
72+
{ MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_GPIO38) },
73+
{ MP_ROM_QSTR(MP_QSTR_CAM_SCL), MP_ROM_PTR(&pin_GPIO39) },
74+
{ MP_ROM_QSTR(MP_QSTR_CAM_SDA), MP_ROM_PTR(&pin_GPIO40) },
75+
{ MP_ROM_QSTR(MP_QSTR_MIC_DATA), MP_ROM_PTR(&pin_GPIO41) },
76+
{ MP_ROM_QSTR(MP_QSTR_MIC_CLK), MP_ROM_PTR(&pin_GPIO42) },
77+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
78+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
79+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
80+
};
81+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Espressif IoT Development Framework Configuration
3+
#
4+
#
5+
# Component config
6+
#
7+
#
8+
# LWIP
9+
#
10+
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
11+
# end of LWIP
12+
# Camera configuration
13+
#
14+
CONFIG_OV2640_SUPPORT=y
15+
# CONFIG_OV7725_SUPPORT is not set
16+
# CONFIG_OV3660_SUPPORT is not set
17+
# end of Camera configuration
18+
# end of Component config
19+
20+
# end of Espressif IoT Development Framework Configuration

0 commit comments

Comments
 (0)