diff options
author | Tarek BOCHKATI <tarek.bouchkati@gmail.com> | 2020-03-09 13:33:08 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2020-03-23 22:09:44 +0000 |
commit | bff1b6f05a56eed8e150c25d925bd51ca2840daf (patch) | |
tree | aa8586f99dc10ebdc9c306ec5744e66ece1427f0 | |
parent | c999fcef3e96fbdb5226b0913bddf29365566ce8 (diff) | |
download | riscv-openocd-bff1b6f05a56eed8e150c25d925bd51ca2840daf.zip riscv-openocd-bff1b6f05a56eed8e150c25d925bd51ca2840daf.tar.gz riscv-openocd-bff1b6f05a56eed8e150c25d925bd51ca2840daf.tar.bz2 |
flash/stm32l4x: add support of STM32WB3x devices
STM32WB3x devices' flash are quite similar to STM32WB5x,
except the maximum flash size, which is 512K for WB3x and 1M for WB5x
Change-Id: I3098d7153a7429e0e72c75cec962c05768b0b018
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5475
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
-rw-r--r-- | src/flash/nor/stm32l4x.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c index 42f3394..2cc378a 100644 --- a/src/flash/nor/stm32l4x.c +++ b/src/flash/nor/stm32l4x.c @@ -188,6 +188,10 @@ static const struct stm32l4_rev stm32_495_revs[] = { { 0x2001, "2.1" }, }; +static const struct stm32l4_rev stm32_496_revs[] = { + { 0x1000, "A" }, +}; + static const struct stm32l4_rev stm32_497_revs[] = { { 0x1000, "1.0" }, }; @@ -314,6 +318,16 @@ static const struct stm32l4_part_info stm32l4_parts[] = { .fsize_addr = 0x1FFF75E0, }, { + .id = 0x496, + .revs = stm32_496_revs, + .num_revs = ARRAY_SIZE(stm32_496_revs), + .device_str = "STM32WB3x", + .max_flash_size_kb = 512, + .has_dual_bank = false, + .flash_regs_base = 0x58004000, + .fsize_addr = 0x1FFF75E0, + }, + { .id = 0x497, .revs = stm32_497_revs, .num_revs = ARRAY_SIZE(stm32_497_revs), @@ -985,6 +999,7 @@ static int stm32l4_probe(struct flash_bank *bank) } break; case 0x495: /* STM32WB5x */ + case 0x496: /* STM32WB3x */ /* single bank flash */ page_size_kb = 4; num_pages = flash_size_kb / page_size_kb; |