summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/storage.c
diff options
context:
space:
mode:
authorRyan Shaw <ryannathans@hotmail.com>2016-02-09 15:36:51 +1100
committerDamien George <damien.p.george@gmail.com>2016-03-09 22:46:41 +0000
commitad725a6661b2672cff5cdb7332dd01128505d3d9 (patch)
tree9d7cc5366ab4f1a5cd955662df7c4d6ffb91579e /stmhal/storage.c
parent853fb08d0d42cca2087fb5b6ae24278bafd6a503 (diff)
downloadmicropython-ad725a6661b2672cff5cdb7332dd01128505d3d9.tar.gz
micropython-ad725a6661b2672cff5cdb7332dd01128505d3d9.zip
stmhal: Add support for generic STM32F439 board (non DISCO).
Diffstat (limited to 'stmhal/storage.c')
-rw-r--r--stmhal/storage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/stmhal/storage.c b/stmhal/storage.c
index 93eba60f54..dd1e3e2852 100644
--- a/stmhal/storage.c
+++ b/stmhal/storage.c
@@ -66,6 +66,15 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
#define FLASH_MEM_SEG1_START_ADDR (0x08004000) // sector 1
#define FLASH_MEM_SEG1_NUM_BLOCKS (224) // sectors 1,2,3,4: 16k+16k+16k+64k=112k
+#elif defined(STM32F439xx)
+
+#define CACHE_MEM_START_ADDR (0x10000000) // CCM data RAM, 64k
+#define FLASH_SECTOR_SIZE_MAX (0x10000) // 64k max, size of CCM
+#define FLASH_MEM_SEG1_START_ADDR (0x08100000) // sector 12
+#define FLASH_MEM_SEG1_NUM_BLOCKS (384) // sectors 12,13,14,15,16,17: 16k+16k+16k+16k+64k+64k(of 128k)=192k
+#define FLASH_MEM_SEG2_START_ADDR (0x08140000) // sector 18
+#define FLASH_MEM_SEG2_NUM_BLOCKS (128) // sector 18: 64k(of 128k)
+
#elif defined(STM32F746xx)
// The STM32F746 doesn't really have CCRAM, so we use the 64K DTCM for this.