fix STM32L1 FLASH_SIZE for cat.3 devices with DEV_ID 0x436

pull/15368/head
caodd 2023-01-04 20:50:58 +08:00
parent 149d444825
commit c80da531a8
1 changed files with 3 additions and 1 deletions

View File

@ -121,7 +121,9 @@ typedef struct
* @{
*/
#define FLASH_SIZE (uint32_t)((*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU) * 1024U)
#define FLASH_SIZE_RAW (uint32_t)(*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU)
#define FLASH_SIZE (((FLASH_SIZE_RAW) == 0 ? 384 : ((FLASH_SIZE_RAW) == 1 ? 256 : (FLASH_SIZE_RAW))) * 1024)
#define FLASH_PAGE_SIZE (256U) /*!< FLASH Page Size in bytes */
/**