Skip to content

Commit d67d4b1

Browse files
committed
chore(wb0): add EEPROM support
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 8ef5af3 commit d67d4b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libraries/EEPROM/src/utility/stm32_eeprom.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,9 @@ 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+
/* TODO: else HAL_FLASHEx_PageProtection? */
270271
#endif
271272
{
272273
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_ALL_ERRORS);
@@ -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;

0 commit comments

Comments
 (0)