Skip to content

Commit

Permalink
Increase STM32L0 option_size to 20
Browse files Browse the repository at this point in the history
The FLASH_OPTR, FLASH_WRPROT1 and FLASH_WRPROT2 registers are spread across
20 option bytes.  With the original option_size of 4, only the lower 16 bits
of FLASH_OPTR could be modified.
  • Loading branch information
timothytylee committed Oct 8, 2020
1 parent d819a4a commit 2a746af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stlink-lib/chipid.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static const struct stlink_chipid_params devices[] = {
.bootrom_base = 0x1ff0000,
.bootrom_size = 0x1000,
.option_base = STM32_L0_CATx_OPTION_BYTES_BASE,
.option_size = 4,
.option_size = 20,
},
{
// STM32L0x Category 5
Expand All @@ -400,7 +400,7 @@ static const struct stlink_chipid_params devices[] = {
.bootrom_base = 0x1ff0000,
.bootrom_size = 0x2000,
.option_base = STM32_L0_CATx_OPTION_BYTES_BASE,
.option_size = 4,
.option_size = 20,
},
{
// STM32L0x Category 2
Expand All @@ -414,7 +414,7 @@ static const struct stlink_chipid_params devices[] = {
.bootrom_base = 0x1ff0000,
.bootrom_size = 0x1000,
.option_base = STM32_L0_CATx_OPTION_BYTES_BASE,
.option_size = 4,
.option_size = 20,
},
{
// STM32F334, STM32F303x6/8, and STM32F328
Expand Down

0 comments on commit 2a746af

Please sign in to comment.