Skip to content

Commit

Permalink
Merge pull request #1416 from xlz/testing
Browse files Browse the repository at this point in the history
Fixed STM32H7 FLASH_OPTCR unlock sequence
  • Loading branch information
Nightwalker-87 authored Aug 2, 2024
2 parents 35e6e9a + 42b3a10 commit f5da718
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion inc/stm32flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@
#define FLASH_H7_KEYR1 (FLASH_H7_REGS_ADDR + 0x04)
#define FLASH_H7_KEYR2 (FLASH_H7_REGS_ADDR + 0x104)
#define FLASH_H7_OPT_KEYR (FLASH_H7_REGS_ADDR + 0x08)
#define FLASH_H7_OPT_KEYR2 (FLASH_H7_REGS_ADDR + 0x108)
#define FLASH_H7_CR1 (FLASH_H7_REGS_ADDR + 0x0c)
#define FLASH_H7_CR2 (FLASH_H7_REGS_ADDR + 0x10c)
#define FLASH_H7_SR1 (FLASH_H7_REGS_ADDR + 0x10)
Expand Down
2 changes: 0 additions & 2 deletions src/stlink-lib/common_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,6 @@ static int32_t unlock_flash_option(stlink_t *sl) {
break;
case STM32_FLASH_TYPE_H7:
optkey_reg = FLASH_H7_OPT_KEYR;
if (sl->chip_flags & CHIP_F_HAS_DUAL_BANK)
optkey2_reg = FLASH_H7_OPT_KEYR2;
break;
case STM32_FLASH_TYPE_L0_L1:
optkey_reg = get_stm32l0_flash_base(sl) + FLASH_OPTKEYR_OFF;
Expand Down

0 comments on commit f5da718

Please sign in to comment.