We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 149d444 + c80da53 commit b1d5fbaCopy full SHA for b1d5fba
targets/TARGET_STM/TARGET_STM32L1/STM32Cube_FW/STM32L1xx_HAL_Driver/stm32l1xx_hal_flash.h
@@ -121,7 +121,9 @@ typedef struct
121
* @{
122
*/
123
124
-#define FLASH_SIZE (uint32_t)((*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU) * 1024U)
+#define FLASH_SIZE_RAW (uint32_t)(*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU)
125
+#define FLASH_SIZE (((FLASH_SIZE_RAW) == 0 ? 384 : ((FLASH_SIZE_RAW) == 1 ? 256 : (FLASH_SIZE_RAW))) * 1024)
126
+
127
#define FLASH_PAGE_SIZE (256U) /*!< FLASH Page Size in bytes */
128
129
/**
0 commit comments