We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee0f17 commit 4b10b57Copy full SHA for 4b10b57
cores/arduino/stm32/stm32_eeprom.c
@@ -70,10 +70,12 @@
70
*/
71
// We use the last page of the flash to store data (to prevent code overwritten).
72
#if defined (STM32F0xx) || defined (STM32F1xx) || defined(STM32L1xx)
73
-#ifdef FLASH_BANK2_END
+#if defined (FLASH_BANK2_END)
74
#define FLASH_BASE_ADDRESS ((uint32_t)((FLASH_BANK2_END + 1) - FLASH_PAGE_SIZE))
75
-#else
+#elif defined (FLASH_BANK1_END)
76
#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))
79
#endif // FLASH_BANK2_END
80
#elif defined (STM32F2xx) || defined (STM32F4xx) || defined (STM32F7xx)
81
#define FLASH_BASE_ADDRESS ((uint32_t)(FLASH_END + 1) - FLASH_PAGE_SIZE)
0 commit comments