Merge pull request #15368 from caoddx/fix_stm32l1_flash_size

fix STM32L1 FLASH_SIZE for cat.3 devices with DEV_ID 0x436
pull/15369/head
Martin Kojtal 2023-01-05 14:23:08 +00:00 committed by GitHub
commit b1d5fbad5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 */
/**