Skip to content

Commit f0651b8

Browse files
committed
stm32: Change Flash sector size for STM32H7A3.
STM32H7A3 has 2MB internal flash and each sector size is 8KB. Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
1 parent 2ab06b6 commit f0651b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/stm32/flash.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,13 @@ static const flash_layout_t flash_layout[] = {
157157

158158
#define FLASH_LAYOUT_IS_HOMOGENEOUS (1)
159159
#define FLASH_LAYOUT_START_ADDR (FLASH_BASE)
160+
#if defined(STM32H7A3xx) || defined(STM32H7A3xxQ)
161+
#define FLASH_LAYOUT_SECTOR_SIZE (0x2000)
162+
#define FLASH_LAYOUT_NUM_SECTORS (256)
163+
#else
160164
#define FLASH_LAYOUT_SECTOR_SIZE (0x20000)
161165
#define FLASH_LAYOUT_NUM_SECTORS (16)
166+
#endif
162167

163168
#else
164169
#error Unsupported processor

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