From b960321680a9dc4563f0545ea82d50f9e3a48662 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Sat, 21 Oct 2023 09:51:13 +1100 Subject: [PATCH 1/9] Added Unexpected Maker BLING and TinyWATXH-S3 for Espressif port. --- .../boards/unexpectedmaker_bling/board.c | 29 +++++++++ .../unexpectedmaker_bling/mpconfigboard.h | 45 +++++++++++++ .../unexpectedmaker_bling/mpconfigboard.mk | 18 ++++++ .../boards/unexpectedmaker_bling/pins.c | 56 ++++++++++++++++ .../boards/unexpectedmaker_bling/sdkconfig | 41 ++++++++++++ .../unexpectedmaker_tinywatch_s3/board.c | 29 +++++++++ .../mpconfigboard.h | 41 ++++++++++++ .../mpconfigboard.mk | 15 +++++ .../unexpectedmaker_tinywatch_s3/pins.c | 64 +++++++++++++++++++ .../unexpectedmaker_tinywatch_s3/sdkconfig | 41 ++++++++++++ 10 files changed, 379 insertions(+) create mode 100644 ports/espressif/boards/unexpectedmaker_bling/board.c create mode 100644 ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.h create mode 100644 ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.mk create mode 100644 ports/espressif/boards/unexpectedmaker_bling/pins.c create mode 100644 ports/espressif/boards/unexpectedmaker_bling/sdkconfig create mode 100644 ports/espressif/boards/unexpectedmaker_tinywatch_s3/board.c create mode 100644 ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.h create mode 100644 ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.mk create mode 100644 ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c create mode 100644 ports/espressif/boards/unexpectedmaker_tinywatch_s3/sdkconfig diff --git a/ports/espressif/boards/unexpectedmaker_bling/board.c b/ports/espressif/boards/unexpectedmaker_bling/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_bling/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.h new file mode 100644 index 0000000000..1e39725de2 --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.h @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "BLING!" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO17) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define DOUBLE_TAP_PIN (&pin_GPIO47) diff --git a/ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.mk new file mode 100644 index 0000000000..a34c05c94c --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_bling/mpconfigboard.mk @@ -0,0 +1,18 @@ +USB_VID = 0x303A +USB_PID = 0x8180 +USB_PRODUCT = "BLING!" +USB_MANUFACTURER = "UnexpectedMaker" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +# CIRCUITPY_BITBANG_NEOPIXEL = 1 + +CIRCUITPY_STAGE = 1 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD diff --git a/ports/espressif/boards/unexpectedmaker_bling/pins.c b/ports/espressif/boards/unexpectedmaker_bling/pins.c new file mode 100644 index 0000000000..ea5941c6bc --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_bling/pins.c @@ -0,0 +1,56 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + + // Battery voltage sense pin + { MP_ROM_QSTR(MP_QSTR_VBAT_VOLTAGE), MP_ROM_PTR(&pin_GPIO17) }, + + // 5V present sense pin + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO16) }, + + // SPI + { MP_ROM_QSTR(MP_QSTR_MO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MI), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO36) }, + + // I2C + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + // uSD Card + { MP_ROM_QSTR(MP_QSTR_SD_DETECT), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO21) }, + + // User Buttons + { MP_ROM_QSTR(MP_QSTR_BUTTON_A), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_B), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_C), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_D), MP_ROM_PTR(&pin_GPIO34) }, + + // I2S Mic ICS-43434 + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_DATA), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_BCLK), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_WS), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_SEL), MP_ROM_PTR(&pin_GPIO39) }, + + // I2S Amplifier MAX98357A + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_LRCLK), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_BCLK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_DATA), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_SD), MP_ROM_PTR(&pin_GPIO4) }, + + // RTC Interrupt Pin + { MP_ROM_QSTR(MP_QSTR_RTC_INT), MP_ROM_PTR(&pin_GPIO7) }, + + // LED Matrix + { MP_ROM_QSTR(MP_QSTR_MATRIX_POWER), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_MATRIX_DATA), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/unexpectedmaker_bling/sdkconfig b/ports/espressif/boards/unexpectedmaker_bling/sdkconfig new file mode 100644 index 0000000000..5989ff5f8b --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_bling/sdkconfig @@ -0,0 +1,41 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_MODE_OCT is not set +CONFIG_SPIRAM_MODE_QUAD=y +CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +# CONFIG_SPIRAM_SIZE is not set + +# +# PSRAM clock and cs IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +# CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyS3" +# end of LWIP diff --git a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/board.c b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.h new file mode 100644 index 0000000000..b749429338 --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "TinyWATCH S3" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO9, .sda = &pin_GPIO8}, \ + {.scl = &pin_GPIO10, .sda = &pin_GPIO5}} + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.mk new file mode 100644 index 0000000000..e843f0c313 --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/mpconfigboard.mk @@ -0,0 +1,15 @@ +USB_VID = 0x303A +USB_PID = 0x81B1 +USB_PRODUCT = "TinyWATCH S3" +USB_MANUFACTURER = "UnexpectedMaker" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_STAGE = 1 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ST7789 diff --git a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c new file mode 100644 index 0000000000..fe213b13f7 --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c @@ -0,0 +1,64 @@ +#include "shared-bindings/board/__init__.h" + +CIRCUITPY_BOARD_BUS_SINGLETON(touch_i2c, i2c, 1) + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_USER_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + + // Buzzer + { MP_ROM_QSTR(MP_QSTR_BUZZER), MP_ROM_PTR(&pin_GPIO18) }, + + // SPI + { MP_ROM_QSTR(MP_QSTR_MO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MI), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO36) }, + + // TFT Screen IO + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO13) }, + + // I2C - BUS1 - Main Peripherals + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + // I2C - BUS2 - Touch IC + { MP_ROM_QSTR(MP_QSTR_TOUCH_I2C), MP_ROM_PTR(&board_touch_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_SCL2), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH_INT), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH_RESET), MP_ROM_PTR(&pin_GPIO12) }, + + // RTC Interrupt Pin + { MP_ROM_QSTR(MP_QSTR_RTC_INT), MP_ROM_PTR(&pin_GPIO4) }, + + // Fuel Gauge Interrupt/Alert Pin + { MP_ROM_QSTR(MP_QSTR_FG_ALERT), MP_ROM_PTR(&pin_GPIO14) }, + + // BMI270 Interrupt Pins + { MP_ROM_QSTR(MP_QSTR_BMI_INT1), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_BMI_INT2), MP_ROM_PTR(&pin_GPIO7) }, + + // I2S Mic ICS-43434 + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_DATA), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_BCLK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MIC_WS), MP_ROM_PTR(&pin_GPIO3) }, + + // User Power Control + { MP_ROM_QSTR(MP_QSTR_USER_PWR_SHUTDOWN), MP_ROM_PTR(&pin_GPIO21) }, + + // External user FLASH CS pin + { MP_ROM_QSTR(MP_QSTR_EXT_FLASH_CS), MP_ROM_PTR(&pin_GPIO33) }, + + // VBUS sense IO to detect if USB power is present + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/sdkconfig new file mode 100644 index 0000000000..8a8c4137d8 --- /dev/null +++ b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/sdkconfig @@ -0,0 +1,41 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_MODE_OCT is not set +CONFIG_SPIRAM_MODE_QUAD=y +CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +# CONFIG_SPIRAM_SIZE is not set + +# +# PSRAM clock and cs IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +# CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyWATCHS3" +# end of LWIP From bdabf7c5d6a7c3fe35b2ca5005e88eb071cb2b2c Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Sun, 22 Oct 2023 17:53:25 +1100 Subject: [PATCH 2/9] Fixed incorrect IO assignment for UM TinyWATCH S3 --- ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c index fe213b13f7..9f8554f7b3 100644 --- a/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c +++ b/ports/espressif/boards/unexpectedmaker_tinywatch_s3/pins.c @@ -19,7 +19,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // TFT Screen IO { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO13) }, // I2C - BUS1 - Main Peripherals From 0f07a9b96e16bf98d35e8319ec8b47885ce25066 Mon Sep 17 00:00:00 2001 From: Joshua Broekhuijsen Date: Sun, 22 Oct 2023 21:04:01 -0500 Subject: [PATCH 3/9] Fixed the RP2040 interrupt problem --- ports/raspberrypi/common-hal/pulseio/PulseIn.c | 9 +++++++++ ports/raspberrypi/common-hal/pulseio/PulseIn.h | 1 + 2 files changed, 10 insertions(+) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.c b/ports/raspberrypi/common-hal/pulseio/PulseIn.c index 346c0951ed..042f2415b0 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.c @@ -56,6 +56,7 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, self->idle_state = idle_state; self->start = 0; self->len = 0; + self->len_target = 0; common_hal_rp2pio_statemachine_construct(&self->state_machine, pulsein_program, MP_ARRAY_SIZE(pulsein_program), @@ -133,6 +134,8 @@ void common_hal_pulseio_pulsein_interrupt(void *self_in) { self->buffer[buf_index] = (uint16_t)result; if (self->len < self->maxlen) { self->len++; + self->len_target++; // The interrupt will only cause a problem in either len or len_target, not both. + // So we can just check for a match, and choose the higher. } else { self->start = (self->start + 1) % self->maxlen; } @@ -174,7 +177,13 @@ uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t *self) { } uint16_t value = self->buffer[self->start]; self->start = (self->start + 1) % self->maxlen; + self->len_target--; self->len--; + if (self->len != self->len_target) { + uint16_t len_accurate = self->len > self->len_target ? self->len : self->len_target; + self->len_target = len_accurate; + self->len = len_accurate; + } return value; } diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.h b/ports/raspberrypi/common-hal/pulseio/PulseIn.h index 8694f75e62..9db15a687f 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.h +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.h @@ -43,6 +43,7 @@ typedef struct { volatile bool last_level; volatile uint32_t level_count; volatile uint16_t len; + volatile uint16_t len_target; volatile uint16_t start; rp2pio_statemachine_obj_t state_machine; } pulseio_pulsein_obj_t; From ecf5a6be97e52e145ba75d0681d5e856195aecd4 Mon Sep 17 00:00:00 2001 From: Joshua Broekhuijsen Date: Mon, 23 Oct 2023 18:00:21 -0500 Subject: [PATCH 4/9] Changed to interrupt guards --- ports/raspberrypi/common-hal/pulseio/PulseIn.c | 11 ++--------- ports/raspberrypi/common-hal/pulseio/PulseIn.h | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.c b/ports/raspberrypi/common-hal/pulseio/PulseIn.c index 042f2415b0..70d542246e 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.c @@ -56,7 +56,6 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, self->idle_state = idle_state; self->start = 0; self->len = 0; - self->len_target = 0; common_hal_rp2pio_statemachine_construct(&self->state_machine, pulsein_program, MP_ARRAY_SIZE(pulsein_program), @@ -134,8 +133,6 @@ void common_hal_pulseio_pulsein_interrupt(void *self_in) { self->buffer[buf_index] = (uint16_t)result; if (self->len < self->maxlen) { self->len++; - self->len_target++; // The interrupt will only cause a problem in either len or len_target, not both. - // So we can just check for a match, and choose the higher. } else { self->start = (self->start + 1) % self->maxlen; } @@ -176,14 +173,10 @@ uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t *self) { mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); } uint16_t value = self->buffer[self->start]; + common_hal_mcu_disable_interrupts(); self->start = (self->start + 1) % self->maxlen; - self->len_target--; self->len--; - if (self->len != self->len_target) { - uint16_t len_accurate = self->len > self->len_target ? self->len : self->len_target; - self->len_target = len_accurate; - self->len = len_accurate; - } + common_hal_mcu_enable_interrupts(); return value; } diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.h b/ports/raspberrypi/common-hal/pulseio/PulseIn.h index 9db15a687f..8694f75e62 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.h +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.h @@ -43,7 +43,6 @@ typedef struct { volatile bool last_level; volatile uint32_t level_count; volatile uint16_t len; - volatile uint16_t len_target; volatile uint16_t start; rp2pio_statemachine_obj_t state_machine; } pulseio_pulsein_obj_t; From dc2dc9d0582cbc0465e7bb913adb10f83e87585e Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Mon, 6 Nov 2023 08:24:41 -0800 Subject: [PATCH 5/9] Fix off-by-one in flash block read with fake MBR --- supervisor/shared/flash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c index 53815c9836..9d885cd267 100644 --- a/supervisor/shared/flash.c +++ b/supervisor/shared/flash.c @@ -105,6 +105,7 @@ static mp_uint_t flash_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t n if (num_blocks > 1) { dest += 512; num_blocks -= 1; + block_num += 1; // Fall through and do a read from flash. } else { return 0; // Done and ok. From bfb830480c10606e48819733e0b37dd37e9c4992 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 7 Nov 2023 16:19:53 -0500 Subject: [PATCH 6/9] fix busio example; update some scripts for Python 3.12 --- docs/shared_bindings_matrix.py | 6 +++--- shared-bindings/busio/__init__.c | 9 ++++++--- tools/build_release_files.py | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 4cc9409325..d865f6963d 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -170,7 +170,7 @@ def build_module_map(): search_identifier = ADDITIONAL_MODULES[module] else: search_identifier = "CIRCUITPY_" + module.lstrip("_").upper() - re_pattern = f"{re.escape(search_identifier)}\s*\??=\s*(.+)" + re_pattern = fr"{re.escape(search_identifier)}\s*\??=\s*(.+)" find_config = re.findall(re_pattern, configs) if not find_config: continue @@ -242,12 +242,12 @@ def get_repository_url(directory): with open(readme, "r") as fp: for line in fp.readlines(): if m := re.match( - "\s+:target:\s+(http\S+(docs.circuitpython|readthedocs)\S+)\s*", + r"\s+:target:\s+(http\S+(docs.circuitpython|readthedocs)\S+)\s*", line, ): path = m.group(1) break - if m := re.search("<(http[^>]+)>", line): + if m := re.search(r"<(http[^>]+)>", line): path = m.group(1) break if path is None: diff --git a/shared-bindings/busio/__init__.c b/shared-bindings/busio/__init__.c index 776920385e..a0b5f687b5 100644 --- a/shared-bindings/busio/__init__.c +++ b/shared-bindings/busio/__init__.c @@ -59,12 +59,15 @@ //| from board import * //| //| i2c = busio.I2C(SCL, SDA) +//| i2c.try_lock() //| print(i2c.scan()) +//| i2c.unlock() //| i2c.deinit() //| -//| This example will initialize the the device, run -//| :py:meth:`~busio.I2C.scan` and then :py:meth:`~busio.I2C.deinit` the -//| hardware. The last step is optional because CircuitPython automatically +//| This example will initialize the the device, lock the I2C bus, run +//| :py:meth:`~busio.I2C.scan`, unlock the bus, +//| and then :py:meth:`~busio.I2C.deinit` the hardware. +//| The last step is optional because CircuitPython automatically //| resets hardware after a program finishes. //| //| Note that drivers will typically handle communication if provided the bus diff --git a/tools/build_release_files.py b/tools/build_release_files.py index 341ae2d67f..ce23f57e88 100755 --- a/tools/build_release_files.py +++ b/tools/build_release_files.py @@ -139,7 +139,7 @@ for board in build_boards: # Flush so we will see something before 10 minutes has passed. print(flush=True) - if (not build_all) and (language is LANGUAGE_FIRST) and (exit_status is 0): + if (not build_all) and (language == LANGUAGE_FIRST) and (exit_status == 0): try: with open( f"../ports/{board_info['port']}/{build_dir}/firmware.size.json", "r" From 1451d779a2d2cc9c2d15e2a10802efba51dbbc28 Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Sun, 12 Nov 2023 14:22:37 -0800 Subject: [PATCH 7/9] Implement stop_ap for RP2 --- ports/raspberrypi/common-hal/wifi/Radio.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 8571d490c4..b1715a8c6c 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -206,18 +206,12 @@ void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self) { } if (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) != CYW43_LINK_DOWN) { - mp_raise_NotImplementedError(translate("Stopping AP is not supported.")); + // Disassociate from WLAN + cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP); + // Stop AP + cyw43_wifi_set_up(&cyw43_state, CYW43_ITF_AP, false, 0); + bindings_cyw43_wifi_enforce_pm(); } - - /* - * AP cannot be disconnected. cyw43_wifi_leave is broken. - * This code snippet should work, but doesn't. - * - * cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP); - * cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA); - * - * bindings_cyw43_wifi_enforce_pm(); - */ } static bool connection_unchanged(wifi_radio_obj_t *self, const uint8_t *ssid, size_t ssid_len) { From 80f8979b91a84777c575dc6e1bfe248db06d9cbd Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Nov 2023 19:59:14 -0500 Subject: [PATCH 8/9] Fix ADC channel for IO32 on ESP32 --- ports/espressif/common-hal/analogio/AnalogIn.c | 2 +- ports/espressif/peripherals/esp32/pins.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index fb2e098cb4..7d367f8ccb 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -54,7 +54,7 @@ void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { - if (pin->adc_index == 0 || pin->adc_channel == ADC_CHANNEL_MAX) { + if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) { raise_ValueError_invalid_pin(); } common_hal_mcu_pin_claim(pin); diff --git a/ports/espressif/peripherals/esp32/pins.c b/ports/espressif/peripherals/esp32/pins.c index 9bf00a0e56..2c30ab080d 100644 --- a/ports/espressif/peripherals/esp32/pins.c +++ b/ports/espressif/peripherals/esp32/pins.c @@ -59,7 +59,7 @@ const mcu_pin_obj_t pin_GPIO27 = PIN(27, ADC_UNIT_2, ADC_CHANNEL_7, TOUCH_PAD_NU // no GPIO29 // no GPIO30 // no GPIO31 -const mcu_pin_obj_t pin_GPIO32 = PIN(32, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM9); +const mcu_pin_obj_t pin_GPIO32 = PIN(32, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM9); const mcu_pin_obj_t pin_GPIO33 = PIN(33, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM8); const mcu_pin_obj_t pin_GPIO34 = PIN(34, ADC_UNIT_1, ADC_CHANNEL_6, NO_TOUCH_CHANNEL); const mcu_pin_obj_t pin_GPIO35 = PIN(35, ADC_UNIT_1, ADC_CHANNEL_7, NO_TOUCH_CHANNEL); From 06639a247399216f348dd429b5487b2c7afa98ff Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 16 Nov 2023 09:13:58 -0500 Subject: [PATCH 9/9] add W25Q16JVxQ as possible 2MB flash chip --- .../boards/circuitplayground_express/mpconfigboard.mk | 2 +- .../boards/circuitplayground_express_crickit/mpconfigboard.mk | 2 +- .../boards/circuitplayground_express_displayio/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk | 2 +- .../boards/feather_m0_express_crickit/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk | 2 +- ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk | 2 +- ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk | 2 +- ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk | 2 +- ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk | 2 +- ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk | 2 +- ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk | 2 +- ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk | 2 +- ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk | 2 +- ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk | 2 +- .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index b64fd2033d..c85991e972 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ # Turn off displayio to make room for frozen libs. diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index c108a90250..0e777ed18f 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C, W25Q16JVxQ" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index cc125e1ffb..91d1f8f01e 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C, W25Q16JVxQ" # Turn off features and optimizations for displayio build to make room for additional frozen libs. LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index 3aa03e61f6..c3b8f64313 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -7,5 +7,5 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index d18d986e6d..f43f92b8c2 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ # Make space for frozen libs diff --git a/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk index 8c9779e5f9..339f7c8ff3 100644 --- a/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAME51J19A CHIP_FAMILY = same51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = GD25Q16C +EXTERNAL_FLASH_DEVICES = "GD25Q16C,W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY__EVE = 1 diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk index 9a5008be85..3b6fa9b991 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = GD25Q16C +EXTERNAL_FLASH_DEVICES = "GD25Q16C,W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY__EVE = 1 diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index 447e15600e..6dce23e506 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q16FW, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "W25Q16FW, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk index e0fb86f098..c2b0c9d160 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = GD25Q16C +EXTERNAL_FLASH_DEVICES = "GD25Q16C,W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk index 1f77c11931..34dd10c4c2 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY_LTO_PARTITION = one diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index 4e7d799985..fc9230cb64 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -7,5 +7,5 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk index ed1cd2455c..8f8e517479 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY__EVE = 1 diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk index 50780cff07..e75fad362d 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" +EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY__EVE = 1 diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk index f9928c21b8..ae3d8492a2 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk @@ -8,4 +8,4 @@ CHIP_FAMILY = samd21 LONGINT_IMPL = MPZ SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = GD25Q16C +EXTERNAL_FLASH_DEVICES = "GD25Q16C,W25Q16JVxQ" diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk index 30a4aab232..05cf11c504 100644 --- a/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C,W25Q16JVxQ" CIRCUITPY_IS31FL3741 = 1 diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk index bc00790376..a06fefde85 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" diff --git a/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk index f94e49e473..e1a25137a1 100644 --- a/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" diff --git a/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk b/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk index 6d0c13e454..8abf020651 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk +++ b/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk index b291203e2f..f77feb3225 100644 --- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk index 57b39b512b..a3f61733a2 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk @@ -9,4 +9,4 @@ MCU_CHIP = nrf52840 CIRCUITPY_BITBANG_APA102 = 1 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" diff --git a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk index ef0992a742..ebae1d04e1 100644 --- a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" CIRCUITPY__EVE = 1 diff --git a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk index e525ebe1ef..7506500080 100644 --- a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk +++ b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk @@ -4,7 +4,7 @@ USB_PRODUCT = "Feather STM32F405 Express" USB_MANUFACTURER = "Adafruit Industries LLC" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = GD25Q16C +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" MCU_SERIES = F4 MCU_VARIANT = STM32F405xx diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index 9da7163743..64be6f4f14 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -5,7 +5,7 @@ USB_MANUFACTURER = "WeAct" SPI_FLASH_FILESYSTEM = 1 #See supervisor/shared/external_flash/devices.h for options -EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q32JVxQ,W25Q64JVxQ +EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q16JVxQ,W25Q64FV,W25Q32JVxQ,W25Q64JVxQ LONGINT_IMPL = MPZ INTERNAL_FLASH_FILESYSTEM = 0