From 3c743f2664abc7bfd18eaa6705bbaf5c18576a9f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 2 Oct 2018 11:56:09 -0700 Subject: [PATCH] Update Trellis M4 Express for Rev C --- .../boards/trellis_m4_express/mpconfigboard.h | 4 ++-- ports/atmel-samd/external_flash/devices.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h index 117a8ae8e3..fbc5300e24 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h @@ -3,7 +3,7 @@ #define CIRCUITPY_MCU_FAMILY samd51 -// This is for Rev A +// This is for a purple prototype which is Rev C #define MICROPY_HW_APA102_MOSI (&pin_PA01) #define MICROPY_HW_APA102_SCK (&pin_PA00) @@ -28,7 +28,7 @@ #include "external_flash/devices.h" #define EXTERNAL_FLASH_DEVICE_COUNT 1 -#define EXTERNAL_FLASH_DEVICES GD25Q64C +#define EXTERNAL_FLASH_DEVICES W25Q128JV_SQ #include "external_flash/external_flash.h" diff --git a/ports/atmel-samd/external_flash/devices.h b/ports/atmel-samd/external_flash/devices.h index ea1b24a329..974936419d 100644 --- a/ports/atmel-samd/external_flash/devices.h +++ b/ports/atmel-samd/external_flash/devices.h @@ -266,5 +266,23 @@ typedef struct { } +// Settings for the Winbond W25Q128JV-SQ 8MiB SPI flash. Note that JV-IM has a different .memory_type (0x70) +// Datasheet: https://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf +#define W25Q128JV_SQ {\ + .total_size = (1 << 23), /* 16 MiB */ \ + .start_up_time_us = 5000, \ + .manufacturer_id = 0xef, \ + .memory_type = 0x40, \ + .capacity = 0x18, \ + .max_clock_speed_mhz = 133, \ + .has_sector_protection = false, \ + .supports_fast_read = true, \ + .supports_qspi = true, \ + .has_quad_enable = true, \ + .supports_qspi_writes = true, \ + .write_status_register_split = false, \ +} + + #endif // MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H