Skip to content

Commit

Permalink
samd/samd_qspiflash: Add QSPI flash driver and configure it accordingly.
Browse files Browse the repository at this point in the history
The QSPI driver provides the interface for using an on-board QSPI flash for
the filesystem.  It provides the same methods as the driver for the
internal flash and uses the same name.  Therefore, only one of the drivers
for internal flash, SPI flash and QSPI flash must be enabled at a time.

Signed-off-by: robert-hh <robert@hammelrath.com>
  • Loading branch information
robert-hh authored and dpgeorge committed Jun 5, 2023
1 parent 5561130 commit 2b5a5a0
Show file tree
Hide file tree
Showing 8 changed files with 968 additions and 0 deletions.
461 changes: 461 additions & 0 deletions drivers/memory/external_flash_device.h

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.h
Expand Up @@ -3,3 +3,5 @@

#define MICROPY_HW_XOSC32K (1)
#define MICROPY_HW_MCU_OSC32KULP (1)

#define MICROPY_HW_QSPIFLASH GD25Q16C
Expand Up @@ -2,3 +2,5 @@
#define MICROPY_HW_MCU_NAME "SAMD51G19A"

#define MICROPY_HW_DFLL_USB_SYNC (1)

#define MICROPY_HW_QSPIFLASH GD25Q16C
2 changes: 2 additions & 0 deletions ports/samd/boards/MINISAM_M4/mpconfigboard.h
@@ -1,2 +1,4 @@
#define MICROPY_HW_BOARD_NAME "Mini SAM M4"
#define MICROPY_HW_MCU_NAME "SAMD51G19A"

#define MICROPY_HW_QSPIFLASH GD25Q16C
2 changes: 2 additions & 0 deletions ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.h
Expand Up @@ -2,3 +2,5 @@
#define MICROPY_HW_MCU_NAME "SAMD51P19A"

#define MICROPY_HW_XOSC32K (1)

#define MICROPY_HW_QSPIFLASH W25Q32JV_IQ
5 changes: 5 additions & 0 deletions ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.h
Expand Up @@ -8,3 +8,8 @@
// 256k. Since the SAMD51x20A has 256k RAM, the loader symbol is at that address
// and so there is a fix here using the previous definition.
#define DBL_TAP_ADDR_ALT ((volatile uint32_t *)(HSRAM_ADDR + HSRAM_SIZE - 0x10000 - 4))

// Enabling both two lines below will set the boot file system to
// the board's external flash.
#define MICROPY_HW_SPIFLASH (1)
#define MICROPY_HW_SPIFLASH_ID (0)
3 changes: 3 additions & 0 deletions ports/samd/pin_af.h
Expand Up @@ -65,6 +65,9 @@ typedef struct _machine_pin_obj_t {
#define ALT_FCT_TC 4
#define ALT_FCT_TCC1 5
#define ALT_FCT_TCC2 6
#define ALT_FCT_QSPI 7
#define ALT_FCT_CAN1 7
#define ALT_FCT_USB 7

#endif

Expand Down

0 comments on commit 2b5a5a0

Please sign in to comment.