From 931a6adb81bcfb96a1ac15060cc685a592e6d744 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 18 Sep 2023 19:43:02 -0400 Subject: [PATCH] fix CPU on Monster M4SK; turn off audiobusio by default on SAMD51G --- ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk | 3 --- ports/atmel-samd/boards/cp32-m4/mpconfigboard.h | 2 +- ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk | 3 --- .../atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk | 3 --- .../atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.mk | 3 --- ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk | 3 --- ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h | 3 ++- ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk | 3 ++- ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk | 2 -- ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk | 3 --- ports/atmel-samd/mpconfigport.mk | 5 +++++ 11 files changed, 10 insertions(+), 23 deletions(-) diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk index 388aa6e914..a3e80dc28a 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk @@ -10,9 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 - CIRCUITPY_FULL_BUILD = 0 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOCORE = 0 diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h index 13433707af..e8e4c195e1 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h @@ -1,5 +1,5 @@ #define MICROPY_HW_BOARD_NAME "CP32-M4" -#define MICROPY_HW_MCU_NAME "samd51j20" +#define MICROPY_HW_MCU_NAME "samd51j20A" #define MICROPY_HW_APA102_MOSI (&pin_PA12) #define MICROPY_HW_APA102_SCK (&pin_PA13) diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index af0129f10f..fdf3f4ee67 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -9,6 +9,3 @@ CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" LONGINT_IMPL = MPZ - -# No I2S on SAMD51G. -CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk index 7a45ef21e9..e0fb86f098 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk @@ -10,7 +10,4 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 - CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.mk b/ports/atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.mk index 3c407f5306..baedebe811 100644 --- a/ports/atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.mk +++ b/ports/atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.mk @@ -11,9 +11,6 @@ CIRCUITPY_FULL_BUILD = 0 LONGINT_IMPL = MPZ -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 - CIRCUITPY_BITBANG_APA102 = 1 # Override optimization to keep binary small OPTIMIZATION_FLAGS = -Os diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index c3e21a4c36..adbe8c3897 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -10,9 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JVxM, W25Q16JVxQ" LONGINT_IMPL = MPZ -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 - CIRCUITPY_BITBANG_APA102 = 1 #Include these Python libraries in firmware. diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h index 26100960d8..6007edc58a 100644 --- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h +++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h @@ -1,5 +1,6 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Monster M4SK" -#define MICROPY_HW_MCU_NAME "samd51j19" +// Board is mislabeled as SAMD51J19. +#define MICROPY_HW_MCU_NAME "samd51g19" #define CIRCUITPY_MCU_FAMILY samd51 diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk index 87efe005f3..77513fcf27 100644 --- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk +++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk @@ -3,7 +3,8 @@ USB_PID = 0x8048 USB_PRODUCT = "Monster M4SK" USB_MANUFACTURER = "Adafruit Industries LLC" -CHIP_VARIANT = SAMD51J19A +# Board is mislabeled as SAMD51J19. +CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk index 0ae092c693..d464d783a6 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk @@ -12,8 +12,6 @@ SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" LONGINT_IMPL = MPZ -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 # Make room for more stuff CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_DISPLAYIO = 0 diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk index 81df26b0c6..47fbdcceb9 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk @@ -10,7 +10,4 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C" LONGINT_IMPL = MPZ -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 - CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 032e49ce36..884e191fa7 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -108,6 +108,11 @@ CIRCUITPY_SAMD ?= 1 CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12 CIRCUITPY_WATCHDOG ?= 1 +ifeq ($(CHIP_VARIANT),SAMD51G19A) +# No I2S on SAMD51G +CIRCUITPY_AUDIOBUSIO = 0 +endif + endif # samd51 ######################################################################