fix option unlock wait condition

F/723
pull/725/head
Daniele Lacamera 2026-03-16 09:18:57 +01:00
parent 616cb9a989
commit f94d9d2ed1
3 changed files with 3 additions and 3 deletions

View File

@ -323,7 +323,7 @@ void RAMFUNCTION hal_flash_opt_unlock(void)
DMB();
FLASH_OPTKEYR = FLASH_OPTKEY2;
DMB();
while ((FLASH_CR & FLASH_CR_LOCK) != 0)
while ((FLASH_OPTCR & FLASH_OPTCR_OPTLOCK) != 0)
;
}

View File

@ -228,7 +228,7 @@ void RAMFUNCTION hal_flash_opt_unlock(void)
DMB();
FLASH_OPTKEYR = FLASH_OPTKEY2;
DMB();
while ((FLASH_CR & FLASH_CR_LOCK) != 0)
while ((FLASH_CR & FLASH_CR_OPTLOCK) != 0)
;
}

View File

@ -158,7 +158,7 @@ void RAMFUNCTION hal_flash_opt_unlock(void)
DMB();
FLASH_NS_OPTKEYR = FLASH_OPTKEY2;
DMB();
while ((FLASH_NS_CR & FLASH_CR_LOCK) != 0)
while ((FLASH_NS_CR & FLASH_CR_OPTLOCK) != 0)
;
}
}