summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-09-02 00:03:41 +1000
committerDamien George <damien@micropython.org>2021-09-02 00:03:41 +1000
commit25f30eb8a6839d662867ff335eb10d39e93dd9c8 (patch)
treeb3a617b3688b4c09dffddd9e98b2d8a0ff4f1e37
parent89145c6aaded2e35a8239d457f70ef320ec57623 (diff)
stm32/boards/LEGO_HUB_NO6: Add comment re constraints on SPI flash cfg.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h b/ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h
index e208284f4..b3e061efb 100644
--- a/ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h
+++ b/ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h
@@ -79,6 +79,7 @@
// SPI flash, for R/W storage
// The first 1MiB is skipped because it's used by the built-in bootloader
+// Note: MICROPY_HW_SPIFLASH_OFFSET_BYTES must be a multiple of MP_SPIFLASH_ERASE_BLOCK_SIZE
#define MICROPY_HW_SPIFLASH_OFFSET_BYTES (1024 * 1024)
#define MICROPY_HW_SPIFLASH_BLOCKMAP(bl) ((bl) + MICROPY_HW_SPIFLASH_OFFSET_BYTES / FLASH_BLOCK_SIZE)
#define MICROPY_HW_SPIFLASH_BLOCKMAP_EXT(bl) ((bl) + MICROPY_HW_SPIFLASH_OFFSET_BYTES / MP_SPIFLASH_ERASE_BLOCK_SIZE)