Skip to content

Commit 39bc4f9

Browse files
committed
Fix L432KC compilation error
1 parent 77b66e5 commit 39bc4f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

targets/TARGET_STM/TARGET_STM32L4/flash_api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static uint32_t GetPage(uint32_t Addr)
7474
static uint32_t GetBank(uint32_t Addr)
7575
{
7676
uint32_t bank = 0;
77-
77+
#if defined(SYSCFG_MEMRMP_FB_MODE)
7878
if (READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_FB_MODE) == 0) {
7979
/* No Bank swap */
8080
if (Addr < (FLASH_BASE + FLASH_BANK_SIZE)) {
@@ -90,6 +90,10 @@ static uint32_t GetBank(uint32_t Addr)
9090
bank = FLASH_BANK_1;
9191
}
9292
}
93+
#else
94+
/* Device like L432KC */
95+
bank = FLASH_BANK_1;
96+
#endif
9397

9498
return bank;
9599
}

0 commit comments

Comments
 (0)