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>
This commit is contained in:
Tarek BOCHKATI 2020-03-09 13:33:08 +01:00 committed by Tomas Vanek
parent c999fcef3e
commit bff1b6f05a
1 changed files with 15 additions and 0 deletions

View File

@ -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" },
};
@ -313,6 +317,16 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
.flash_regs_base = 0x58004000,
.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,
@ -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;