File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
libraries/EEPROM/src/utility Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -265,9 +265,10 @@ void eeprom_buffer_flush(void)
265
265
EraseInitStruct .PageAddress = FLASH_BASE_ADDRESS ;
266
266
#endif
267
267
EraseInitStruct .NbPages = 1 ;
268
- #if !defined(PROT_LEVEL_NONE )
268
+ #if !defined(PROT_LEVEL_NONE ) && !defined( STM32WL3x )
269
269
if (HAL_FLASH_Unlock () == HAL_OK )
270
- #endif
270
+ /* TODO: else HAL_FLASHEx_PageProtection? */
271
+ #endif
271
272
{
272
273
__HAL_FLASH_CLEAR_FLAG (FLASH_FLAG_ALL_ERRORS );
273
274
if (HAL_FLASHEx_Erase (& EraseInitStruct , & pageError ) == HAL_OK ) {
@@ -303,9 +304,9 @@ void eeprom_buffer_flush(void)
303
304
}
304
305
}
305
306
}
306
- #if !defined(PROT_LEVEL_NONE )
307
+ #if !defined(PROT_LEVEL_NONE ) && !defined( STM32WL3x )
307
308
HAL_FLASH_Lock ();
308
- #endif /* FLASH_KEY1 || FLASH_PEKEY1 */
309
+ #endif
309
310
}
310
311
#else /* FLASH_TYPEERASE_SECTORS */
311
312
uint32_t SectorError = 0 ;
You can’t perform that action at this time.
0 commit comments