Skip to content

Commit 2a2b698

Browse files
committed
samd/Flash: Add the QSPI flash driver and the mpconfigboard.h files.
The QSPI driver provides the interface for using an on-board QSPI flash for the file system. 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>
1 parent 1329a7f commit 2a2b698

File tree

8 files changed

+969
-0
lines changed

8 files changed

+969
-0
lines changed

drivers/memory/external_flash_device.h

Lines changed: 461 additions & 0 deletions
Large diffs are not rendered by default.

ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33

44
#define MICROPY_HW_XOSC32K (1)
55
#define MICROPY_HW_MCU_OSC32KULP (1)
6+
7+
#define MICROPY_HW_QSPIFLASH GD25Q16C

ports/samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
#define MICROPY_HW_MCU_NAME "SAMD51G19A"
33

44
#define MICROPY_HW_DFLL_USB_SYNC (1)
5+
6+
#define MICROPY_HW_QSPIFLASH GD25Q16C
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
#define MICROPY_HW_BOARD_NAME "Mini SAM M4"
22
#define MICROPY_HW_MCU_NAME "SAMD51G19A"
3+
4+
#define MICROPY_HW_QSPIFLASH GD25Q16C

ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
#define MICROPY_HW_MCU_NAME "SAMD51P19A"
33

44
#define MICROPY_HW_XOSC32K (1)
5+
6+
#define MICROPY_HW_QSPIFLASH W25Q32JV_IQ

ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
// 256k. Since the SAMD51x20A has 256k RAM, the loader symbol is at that address
99
// and so there is a fix here using the previous definition.
1010
#define DBL_TAP_ADDR_ALT ((volatile uint32_t *)(HSRAM_ADDR + HSRAM_SIZE - 0x10000 - 4))
11+
12+
// Enabling both two lines below will set the boot file system to
13+
// the board's external flash.
14+
#define MICROPY_HW_SPIFLASH (1)
15+
#define MICROPY_HW_SPIFLASH_ID (0)

ports/samd/pin_af.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ typedef struct _machine_pin_obj_t {
6565
#define ALT_FCT_TC 4
6666
#define ALT_FCT_TCC1 5
6767
#define ALT_FCT_TCC2 6
68+
#define ALT_FCT_QSPI 7
69+
#define ALT_FCT_CAN1 7
70+
#define ALT_FCT_USB 7
6871

6972
#endif
7073

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy