diff --git a/lib/stm32/common/flash_common_f.c b/lib/stm32/common/flash_common_f.c index d0a2188a..291fad9b 100644 --- a/lib/stm32/common/flash_common_f.c +++ b/lib/stm32/common/flash_common_f.c @@ -27,9 +27,6 @@ void flash_unlock(void) { - /* Clear the unlock state. */ - FLASH_CR |= FLASH_CR_LOCK; - /* Authorize the FPEC access. */ FLASH_KEYR = FLASH_KEYR_KEY1; FLASH_KEYR = FLASH_KEYR_KEY2; diff --git a/lib/stm32/common/flash_common_f24.c b/lib/stm32/common/flash_common_f24.c index 443d9833..db4ce4c5 100644 --- a/lib/stm32/common/flash_common_f24.c +++ b/lib/stm32/common/flash_common_f24.c @@ -96,10 +96,6 @@ reset. void flash_unlock_option_bytes(void) { - /* Clear the unlock state. */ - FLASH_OPTCR |= FLASH_OPTCR_OPTLOCK; - - /* Unlock option bytes. */ FLASH_OPTKEYR = FLASH_OPTKEYR_KEY1; FLASH_OPTKEYR = FLASH_OPTKEYR_KEY2; } diff --git a/lib/stm32/f7/flash.c b/lib/stm32/f7/flash.c index 314343b4..0dcf388b 100644 --- a/lib/stm32/f7/flash.c +++ b/lib/stm32/f7/flash.c @@ -91,10 +91,6 @@ reset. void flash_unlock_option_bytes(void) { - /* Clear the unlock state. */ - FLASH_OPTCR |= FLASH_OPTCR_OPTLOCK; - - /* Unlock option bytes. */ FLASH_OPTKEYR = FLASH_OPTKEYR_KEY1; FLASH_OPTKEYR = FLASH_OPTKEYR_KEY2; } diff --git a/lib/stm32/l4/flash.c b/lib/stm32/l4/flash.c index d1fa4663..fd3665aa 100644 --- a/lib/stm32/l4/flash.c +++ b/lib/stm32/l4/flash.c @@ -98,10 +98,6 @@ void flash_clear_status_flags(void) */ void flash_unlock_option_bytes(void) { - /* Clear the unlock state. */ - FLASH_CR |= FLASH_CR_OPTLOCK; - - /* Unlock option bytes. */ FLASH_OPTKEYR = FLASH_OPTKEYR_KEY1; FLASH_OPTKEYR = FLASH_OPTKEYR_KEY2; }