summaryrefslogtreecommitdiff
path: root/stmhal/storage.c
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2015-07-30 09:50:58 -0700
committerDamien George <damien.p.george@gmail.com>2015-08-03 00:39:27 +0100
commit8f1eced69da2275b70f0c6426290a5370cd250f2 (patch)
tree8b543c55b667a24bf164d3468b5311e14f8b5dbc /stmhal/storage.c
parent751485fe6b7eeb93f171c2f2b0417803f6e78c05 (diff)
stmhal: Add STM32F7 support for USB serial and storage.
USB serial is now working for F7. Internal file storage is now working for F7. The flash is laid out a bit differently to the F4 - 4 x 32K, 1 x 128K with the rest 256K, so the internal storage is 96K. Added more pind definitions for STM32F7DISC board. Made USART1 be the default HWUART repl. The STLINK usb connector also looks like a USB serial port which is attached to USART1 on the STM32F7DISC.
Diffstat (limited to 'stmhal/storage.c')
-rw-r--r--stmhal/storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/storage.c b/stmhal/storage.c
index d0567b4fb..64e810e8f 100644
--- a/stmhal/storage.c
+++ b/stmhal/storage.c
@@ -60,9 +60,9 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
// The STM32F746 doesn't really have CCRAM, so we use the 64K DTCM for this.
#define CACHE_MEM_START_ADDR (0x20000000) // DTCM data RAM, 64k
-#define FLASH_SECTOR_SIZE_MAX (0x10000) // 64k max, size of DTCM
-#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
+#define FLASH_SECTOR_SIZE_MAX (0x08000) // 32k max
+#define FLASH_MEM_SEG1_START_ADDR (0x08008000) // sector 1
+#define FLASH_MEM_SEG1_NUM_BLOCKS (192) // sectors 1,2,3: 32k+32k+32=96k
#else
#error "no storage support for this MCU"