Skip to content

Commit 0e41b07

Browse files
djiatsaf-stkartben
authored andcommitted
drivers : flash: update way to get flash size
The LL_GetFlashSize function has been removed for this new HAL H7RS release. Retrieves the value now from the devicetree using the DT_REG_SIZE macro. Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent e3b4711 commit 0e41b07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/flash/flash_stm32h7x.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN);
4545
#define REAL_FLASH_SIZE_KB (KB(STM32H7_M4_FLASH_SIZE * 2))
4646
#endif
4747
#else
48-
#define REAL_FLASH_SIZE_KB KB(LL_GetFlashSize())
48+
#define REAL_FLASH_SIZE_KB DT_REG_SIZE(DT_INST(0, st_stm32_nv_flash))
4949
#endif
5050
#define SECTOR_PER_BANK ((REAL_FLASH_SIZE_KB / FLASH_SECTOR_SIZE) / 2)
5151
#if defined(DUAL_BANK)

0 commit comments

Comments
 (0)