diff --git a/ports/espressif/boards/microdev_micro_s2/board.c b/ports/espressif/boards/microdev_micro_s2/board.c index a0e399b1ef..52d640618c 100644 --- a/ports/espressif/boards/microdev_micro_s2/board.c +++ b/ports/espressif/boards/microdev_micro_s2/board.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2021 microDev * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -37,7 +37,7 @@ void board_init(void) { #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ + #endif // SPI Flash and RAM common_hal_never_reset_pin(&pin_GPIO26); @@ -54,7 +54,6 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - } void board_deinit(void) { diff --git a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.h b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.h index b8d6707b7c..065ecdc39d 100644 --- a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +++ b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.h @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2021 microDev * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,26 +24,26 @@ * THE SOFTWARE. */ -// Micropython setup -#define MICROPY_HW_BOARD_NAME "microS2" -#define MICROPY_HW_MCU_NAME "ESP32S2" +// Board setup +#define MICROPY_HW_BOARD_NAME "MicroDev microS2" +#define MICROPY_HW_MCU_NAME "ESP32-S2" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO33) +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO33) // Default bus pins -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) +#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_TX (&pin_GPIO43) -#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) -#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) -// Explanation of how a user got into safe mode. +// Explanation of how a user got into safe mode #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - -#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk index 28d5e047dc..887e6d8b9b 100644 --- a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk @@ -1,17 +1,16 @@ USB_VID = 0x239A USB_PID = 0x80C6 USB_PRODUCT = "microS2" -USB_MANUFACTURER = "microDev" +USB_MANUFACTURER = "MicroDev" IDF_TARGET = esp32s2 INTERNAL_FLASH_FILESYSTEM = 1 -LONGINT_IMPL = MPZ # The default queue depth of 16 overflows on release builds, # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 CIRCUITPY_ESP_FLASH_MODE=qio -CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/espressif/boards/microdev_micro_s2/pins.c b/ports/espressif/boards/microdev_micro_s2/pins.c index 2f0bacc491..faf4a9e473 100644 --- a/ports/espressif/boards/microdev_micro_s2/pins.c +++ b/ports/espressif/boards/microdev_micro_s2/pins.c @@ -1,3 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * 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 "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index 4b8cc5cc36..b3c5219972 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -18,8 +18,8 @@ CONFIG_DEFAULT_PSRAM_CS_IO=26 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y +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 @@ -35,5 +35,5 @@ CONFIG_SPIRAM_MEMTEST=y # # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="microS2" +CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microS2" # end of LWIP