flash/stm32l4x: support STM32C05/09x devices

STM32C05/09x devices are similar to STM32C03/07x devices

Change-Id: I77c803356c32f06699c14622828585609c90a136
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8618
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
HAOUES Ahmed
2025-03-25 14:29:30 +01:00
committed by Antonio Borneo
parent 9a09d38478
commit 797dc7aba7
2 changed files with 36 additions and 0 deletions

View File

@@ -303,10 +303,18 @@ static const struct stm32l4_rev stm32c03xx_revs[] = {
{ 0x1000, "A" }, { 0x1001, "Z" },
};
static const struct stm32l4_rev stm32c05xx_revs[] = {
{ 0x1000, "A" },
};
static const struct stm32l4_rev stm32c071xx_revs[] = {
{ 0x1001, "Z" },
};
static const struct stm32l4_rev stm32c09xx_revs[] = {
{ 0x1000, "A" },
};
static const struct stm32l4_rev stm32g05_g06xx_revs[] = {
{ 0x1000, "A" },
};
@@ -450,6 +458,18 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
.otp_base = 0x1FFF7000,
.otp_size = 1024,
},
{
.id = DEVID_STM32C05XX,
.revs = stm32c05xx_revs,
.num_revs = ARRAY_SIZE(stm32c05xx_revs),
.device_str = "STM32C05xx",
.max_flash_size_kb = 64,
.flags = F_NONE,
.flash_regs_base = 0x40022000,
.fsize_addr = 0x1FFF75A0,
.otp_base = 0x1FFF7000,
.otp_size = 1024,
},
{
.id = DEVID_STM32C071XX,
.revs = stm32c071xx_revs,
@@ -462,6 +482,18 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
.otp_base = 0x1FFF7000,
.otp_size = 1024,
},
{
.id = DEVID_STM32C09XX,
.revs = stm32c09xx_revs,
.num_revs = ARRAY_SIZE(stm32c09xx_revs),
.device_str = "STM32C09xx",
.max_flash_size_kb = 256,
.flags = F_NONE,
.flash_regs_base = 0x40022000,
.fsize_addr = 0x1FFF75A0,
.otp_base = 0x1FFF7000,
.otp_size = 1024,
},
{
.id = DEVID_STM32U53_U54XX,
.revs = stm32u53_u54xx_revs,
@@ -2021,7 +2053,9 @@ static int stm32l4_probe(struct flash_bank *bank)
case DEVID_STM32L43_L44XX:
case DEVID_STM32C01XX:
case DEVID_STM32C03XX:
case DEVID_STM32C05XX:
case DEVID_STM32C071XX:
case DEVID_STM32C09XX:
case DEVID_STM32G05_G06XX:
case DEVID_STM32G07_G08XX:
case DEVID_STM32U031XX:

View File

@@ -88,6 +88,8 @@
#define DEVID_STM32L47_L48XX 0x415
#define DEVID_STM32L43_L44XX 0x435
#define DEVID_STM32C01XX 0x443
#define DEVID_STM32C05XX 0x44C
#define DEVID_STM32C09XX 0x44D
#define DEVID_STM32C03XX 0x453
#define DEVID_STM32U53_U54XX 0x455
#define DEVID_STM32G05_G06XX 0x456