We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1335d1b commit 34296e6Copy full SHA for 34296e6
1 file changed
libraries/EEPROM/src/utility/stm32_eeprom.c
@@ -265,8 +265,9 @@ void eeprom_buffer_flush(void)
265
EraseInitStruct.PageAddress = FLASH_BASE_ADDRESS;
266
#endif
267
EraseInitStruct.NbPages = 1;
268
-#if !defined(PROT_LEVEL_NONE)
+#if !defined(PROT_LEVEL_NONE) && !defined(STM32WL3x)
269
if (HAL_FLASH_Unlock() == HAL_OK)
270
+ /* TODO: else HAL_FLASHEx_PageProtection? */
271
272
{
273
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_ALL_ERRORS);
@@ -303,9 +304,9 @@ void eeprom_buffer_flush(void)
303
304
}
305
306
307
308
HAL_FLASH_Lock();
-#endif /* FLASH_KEY1 || FLASH_PEKEY1 */
309
+#endif
310
311
#else /* FLASH_TYPEERASE_SECTORS */
312
uint32_t SectorError = 0;
0 commit comments