@@ -1004,7 +1004,9 @@ typedef struct
10041004 * @{
10051005 */
10061006#define FLASH_BASE (0x08000000UL) /*!< FLASH(up to 256 KB) base address */
1007- #define SRAM1_BASE (0x20000000UL) /*!< SRAM1(up to 48 KB) base address */
1007+ #define FLASH_END (0x0803FFFFUL) /*!< FLASH END address */
1008+ #define FLASH_BANK1_END (0x0803FFFFUL) /*!< FLASH END address of bank1 */
1009+ #define SRAM1_BASE (0x20000000UL) /*!< SRAM1(up to 48 KB) base address */
10081010#define SRAM2_BASE (0x10000000UL) /*!< SRAM2(16 KB) base address */
10091011#define PERIPH_BASE (0x40000000UL) /*!< Peripheral base address */
10101012#define QSPI_BASE (0x90000000UL) /*!< QUADSPI memories accessible over AHB base address */
@@ -1020,6 +1022,11 @@ typedef struct
10201022#define SRAM1_SIZE_MAX (0x0000C000UL) /*!< maximum SRAM1 size (up to 48 KBytes) */
10211023#define SRAM2_SIZE (0x00004000UL) /*!< SRAM2 size (16 KBytes) */
10221024
1025+ #define FLASH_SIZE_DATA_REGISTER ((uint32_t)0x1FFF75E0)
1026+
1027+ #define FLASH_SIZE (((((*((uint32_t *)FLASH_SIZE_DATA_REGISTER)) & (0x0000FFFFU)) == 0x0000FFFFU)) ? (0x100U << 10U) : \
1028+ (((*((uint32_t *)FLASH_SIZE_DATA_REGISTER)) & (0x0000FFFFU)) << 10U))
1029+
10231030/*!< Peripheral memory map */
10241031#define APB1PERIPH_BASE PERIPH_BASE
10251032#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL)
@@ -10571,8 +10578,12 @@ typedef struct
1057110578#define RTC_TAMPER1_SUPPORT
1057210579#define RTC_TAMPER2_SUPPORT
1057310580#define RTC_TAMPER3_SUPPORT
10581+
1057410582#define RTC_WAKEUP_SUPPORT
1057510583#define RTC_BACKUP_SUPPORT
10584+ /******************** Number of backup registers ******************************/
10585+ #define RTC_BKP_NUMBER 32U
10586+
1057610587
1057710588/******************** Bits definition for RTC_TR register *******************/
1057810589#define RTC_TR_PM_Pos (22U)
@@ -11329,9 +11340,6 @@ typedef struct
1132911340#define RTC_BKP31R_Msk (0xFFFFFFFFUL << RTC_BKP31R_Pos) /*!< 0xFFFFFFFF */
1133011341#define RTC_BKP31R RTC_BKP31R_Msk
1133111342
11332- /******************** Number of backup registers ******************************/
11333- #define RTC_BKP_NUMBER 32U
11334-
1133511343/******************************************************************************/
1133611344/* */
1133711345/* Serial Audio Interface */
@@ -16054,9 +16062,6 @@ typedef struct
1605416062 ((INSTANCE) == TIM15) || \
1605516063 ((INSTANCE) == TIM16))
1605616064
16057- /****************** TIM Instances : supporting synchronization ****************/
16058- #define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
16059-
1606016065/****************** TIM Instances : supporting ADC triggering through TRGO2 ***/
1606116066#define IS_TIM_TRGO2_INSTANCE(INSTANCE) ((INSTANCE) == TIM1)
1606216067
0 commit comments