Skip to content

Commit 150e38e

Browse files
committed
Handle for stm32l151xb
1 parent d29a549 commit 150e38e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/arduino/stm32/stm32_eeprom.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272
#if defined (STM32F0xx) || defined (STM32F1xx) || defined(STM32L1xx)
7373
#ifdef FLASH_BANK2_END
7474
#define FLASH_BASE_ADDRESS ((uint32_t)((FLASH_BANK2_END + 1) - FLASH_PAGE_SIZE))
75-
#else
75+
#elif defined(FLASH_BANK1_END)
7676
#define FLASH_BASE_ADDRESS ((uint32_t)((FLASH_BANK1_END + 1) - FLASH_PAGE_SIZE))
77+
#else
78+
#define FLASH_BASE_ADDRESS ((uint32_t)((FLASH_END + 1) - FLASH_PAGE_SIZE))
7779
#endif // FLASH_BANK2_END
7880
#elif defined (STM32F2xx) || defined (STM32F4xx) || defined (STM32F7xx)
7981
#define FLASH_BASE_ADDRESS ((uint32_t)(FLASH_END + 1) - FLASH_PAGE_SIZE)

0 commit comments

Comments
 (0)