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)
265265 EraseInitStruct .PageAddress = FLASH_BASE_ADDRESS ;
266266#endif
267267 EraseInitStruct .NbPages = 1 ;
268- #if !defined(PROT_LEVEL_NONE )
268+ #if !defined(PROT_LEVEL_NONE ) && !defined( STM32WL3x )
269269 if (HAL_FLASH_Unlock () == HAL_OK )
270- #endif
270+ /* TODO: else HAL_FLASHEx_PageProtection? */
271+ #endif
271272 {
272273 __HAL_FLASH_CLEAR_FLAG (FLASH_FLAG_ALL_ERRORS );
273274 if (HAL_FLASHEx_Erase (& EraseInitStruct , & pageError ) == HAL_OK ) {
@@ -303,9 +304,9 @@ void eeprom_buffer_flush(void)
303304 }
304305 }
305306 }
306- #if !defined(PROT_LEVEL_NONE )
307+ #if !defined(PROT_LEVEL_NONE ) && !defined( STM32WL3x )
307308 HAL_FLASH_Lock ();
308- #endif /* FLASH_KEY1 || FLASH_PEKEY1 */
309+ #endif
309310 }
310311#else /* FLASH_TYPEERASE_SECTORS */
311312 uint32_t SectorError = 0 ;
You can’t perform that action at this time.
0 commit comments