From d18de7ec81c66a8ec31f4b3d57d486a8653985de Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Fri, 17 Feb 2023 16:04:45 +0100 Subject: [PATCH] stm32/boards/ARDUINO_PORTENTA_H7: Update board config files. Changes are: - Freeze micropython-lib time module to get strftime. - Reserve the last 1MB of QSPI flash for (optional) WiFi firmware storage. - Disable SD card mount on boot. - Enable high-speed BLE firmware download. --- ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py | 1 + ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py b/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py index 2a6885818617..1db4b8054cef 100644 --- a/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py +++ b/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py @@ -4,6 +4,7 @@ require("bundle-networking") # Utils +require("time") require("logging") # Bluetooth diff --git a/ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h b/ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h index 986ed2b877c7..674154b316b3 100644 --- a/ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h +++ b/ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h @@ -120,7 +120,8 @@ void PORTENTA_board_osc_enable(int enable); // QSPI flash #1 for storage #define MICROPY_HW_QSPI_PRESCALER (2) // 100MHz #define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27) -#define MICROPY_HW_SPIFLASH_SIZE_BITS (128 * 1024 * 1024) +// Reserve 1MiB at the end for compatibility with alternate firmware that places WiFi blob here. +#define MICROPY_HW_SPIFLASH_SIZE_BITS (120 * 1024 * 1024) #define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI2_CS) #define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI2_CLK) #define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI2_D0) @@ -203,6 +204,7 @@ extern struct _spi_bdev_t spi_bdev; #define MICROPY_HW_SDCARD_D1 (pin_B15) #define MICROPY_HW_SDCARD_D2 (pin_B3) #define MICROPY_HW_SDCARD_D3 (pin_B4) +#define MICROPY_HW_SDCARD_MOUNT_AT_BOOT (0) // USB config #define MICROPY_HW_USB_HS (1) @@ -220,6 +222,7 @@ extern struct _spi_bdev_t spi_bdev; #define MICROPY_HW_BLE_UART_ID (PYB_UART_7) #define MICROPY_HW_BLE_UART_BAUDRATE (115200) #define MICROPY_HW_BLE_UART_BAUDRATE_SECONDARY (3000000) +#define MICROPY_HW_BLE_UART_BAUDRATE_DOWNLOAD_FIRMWARE (3000000) // SDRAM #define MICROPY_HW_SDRAM_SIZE (64 / 8 * 1024 * 1024) // 64 Mbit