diff options
| author | QMK Bot <hello@qmk.fm> | 2021-08-02 04:28:52 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2021-08-02 04:28:52 +0000 |
| commit | 83bd56e68c6d1d7765b0577439b3fbda43d5e234 (patch) | |
| tree | 1d49a83c05472bd4032473c390472659ff5eec1a /tmk_core | |
| parent | ee3c138385a2644b162807ef05261936858a7e25 (diff) | |
| parent | 720c676403660eacb880528f04a5c1d328b84650 (diff) | |
| download | qmk_firmware-83bd56e68c6d1d7765b0577439b3fbda43d5e234.tar.gz qmk_firmware-83bd56e68c6d1d7765b0577439b3fbda43d5e234.zip | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/chibios/flash_stm32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index e8b3dc4bc..66f2b1376 100644 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c | |||
| @@ -161,9 +161,11 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { | |||
| 161 | * @retval None | 161 | * @retval None |
| 162 | */ | 162 | */ |
| 163 | void FLASH_Unlock(void) { | 163 | void FLASH_Unlock(void) { |
| 164 | /* Authorize the FPEC Access */ | 164 | if (FLASH->CR & FLASH_CR_LOCK) { |
| 165 | FLASH->KEYR = FLASH_KEY1; | 165 | /* Authorize the FPEC Access */ |
| 166 | FLASH->KEYR = FLASH_KEY2; | 166 | FLASH->KEYR = FLASH_KEY1; |
| 167 | FLASH->KEYR = FLASH_KEY2; | ||
| 168 | } | ||
| 167 | } | 169 | } |
| 168 | 170 | ||
| 169 | /** | 171 | /** |
