summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/storage.c')
-rw-r--r--stmhal/storage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/stmhal/storage.c b/stmhal/storage.c
index dd1e3e2852..0c91fa0848 100644
--- a/stmhal/storage.c
+++ b/stmhal/storage.c
@@ -84,6 +84,14 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
#define FLASH_MEM_SEG1_START_ADDR (0x08008000) // sector 1
#define FLASH_MEM_SEG1_NUM_BLOCKS (192) // sectors 1,2,3: 32k+32k+32=96k
+#elif defined(STM32L476xx)
+
+// The STM32L476 doesn't have CCRAM, so we use the 32K SRAM2 for this.
+#define CACHE_MEM_START_ADDR (0x10000000) // SRAM2 data RAM, 32k
+#define FLASH_SECTOR_SIZE_MAX (0x00800) // 2k max
+#define FLASH_MEM_SEG1_START_ADDR (0x08000800) // sector 1
+#define FLASH_MEM_SEG1_NUM_BLOCKS (252) // 1 Block=512 Bytes Reserve 126 kBytes
+
#else
#error "no storage support for this MCU"
#endif