File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -180,8 +180,8 @@ void set_data_to_flash(void)
180
180
EraseInitStruct .Page = FLASH_PAGE_NUMBER ;
181
181
#else // STM32F4xx
182
182
EraseInitStruct .PageAddress = FLASH_BASE_ADDRESS ;
183
- EraseInitStruct .NbPages = 1 ;
184
183
#endif
184
+ EraseInitStruct .NbPages = 1 ;
185
185
186
186
if (HAL_FLASH_Unlock () == HAL_OK ) {
187
187
#ifdef STM32L0xx
Original file line number Diff line number Diff line change 48
48
49
49
/* Exported types ------------------------------------------------------------*/
50
50
/* Exported constants --------------------------------------------------------*/
51
+ #if defined (STM32F0xx ) || defined (STM32F1xx ) || defined (STM32F3xx ) || \
52
+ defined (STM32L0xx ) || defined(STM32L4xx )
53
+ #define E2END FLASH_PAGE_SIZE
54
+ #else // STM32F2xx STM32F4xx STM32F7xx
51
55
#define FLASH_SECTOR_SIZE ((uint32_t)(16*1024)) //16kB page
52
56
#define E2END FLASH_SECTOR_SIZE
57
+ #endif
53
58
54
59
/* Exported macro ------------------------------------------------------------*/
55
60
/* Exported functions ------------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments