From: openocd-gerrit <ope...@us...> - 2024-07-25 04:08:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 052a4a69b5098e23efaf4ef993a3f0c44d605943 (commit) from 6554d176e926e1e46b90e1b00d1b3ed1bd20b9ff (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 052a4a69b5098e23efaf4ef993a3f0c44d605943 Author: Tarek BOCHKATI <tar...@st...> Date: Fri Apr 28 17:06:56 2023 +0100 flash/stm32l4x: support STM32U53/U54x devices STM32U53/U54x devices are similar to U57/U58x devices with 2 flash banks up to 256 KB each Change-Id: I774ef0df4dddac5f06bbfc2e6c3fc2e628d2249e Signed-off-by: FBOSTM <fed...@st...> Signed-off-by: Tarek BOCHKATI <tar...@st...> Reviewed-on: https://review.openocd.org/c/openocd/+/7515 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c index b6fa3d651..bb6e9ef04 100644 --- a/src/flash/nor/stm32l4x.c +++ b/src/flash/nor/stm32l4x.c @@ -350,6 +350,10 @@ static const struct stm32l4_rev stm32g49_g4axx_revs[] = { { 0x1000, "A" }, }; +static const struct stm32l4_rev stm32u53_u54xx_revs[] = { + { 0x1000, "A" }, { 0x1001, "Z" }, +}; + static const struct stm32l4_rev stm32u57_u58xx_revs[] = { { 0x1000, "A" }, { 0x1001, "Z" }, { 0x1003, "Y" }, { 0x2000, "B" }, { 0x2001, "X" }, { 0x3000, "C" }, { 0x3001, "W" }, @@ -428,6 +432,18 @@ static const struct stm32l4_part_info stm32l4_parts[] = { .otp_base = 0x1FFF7000, .otp_size = 1024, }, + { + .id = DEVID_STM32U53_U54XX, + .revs = stm32u53_u54xx_revs, + .num_revs = ARRAY_SIZE(stm32u53_u54xx_revs), + .device_str = "STM32U535/U545", + .max_flash_size_kb = 512, + .flags = F_HAS_DUAL_BANK | F_QUAD_WORD_PROG | F_HAS_TZ | F_HAS_L5_FLASH_REGS, + .flash_regs_base = 0x40022000, + .fsize_addr = 0x0BFA07A0, + .otp_base = 0x0BFA0000, + .otp_size = 512, + }, { .id = DEVID_STM32G05_G06XX, .revs = stm32g05_g06xx_revs, @@ -2022,11 +2038,22 @@ static int stm32l4_probe(struct flash_bank *bank) stm32l4_info->bank1_sectors = num_pages / 2; } break; - case DEVID_STM32U59_U5AXX: + case DEVID_STM32U53_U54XX: case DEVID_STM32U57_U58XX: - /* if flash size is more than 1M the device is always dual bank - * otherwise check DUALBANK bit + case DEVID_STM32U59_U5AXX: + /* according to RM0456 Rev 4, Chapter 7.3.1 and 7.9.13 + * U53x/U54x have 512K max flash size: + * 512K variants are always in DUAL BANK mode + * 256K and 128K variants can be in DUAL BANK mode if FLASH_OPTR:DUALBANK is set + * U57x/U58x have 2M max flash size: + * 2M variants are always in DUAL BANK mode + * 1M variants can be in DUAL BANK mode if FLASH_OPTR:DUALBANK is set + * U59x/U5Ax have 4M max flash size: + * 4M variants are always in DUAL BANK mode + * 2M variants can be in DUAL BANK mode if FLASH_OPTR:DUALBANK is set + * Note: flash banks are always contiguous */ + page_size_kb = 8; num_pages = flash_size_kb / page_size_kb; stm32l4_info->bank1_sectors = num_pages; diff --git a/src/flash/nor/stm32l4x.h b/src/flash/nor/stm32l4x.h index 95b6c84a6..5f3bc2657 100644 --- a/src/flash/nor/stm32l4x.h +++ b/src/flash/nor/stm32l4x.h @@ -89,6 +89,7 @@ #define DEVID_STM32L43_L44XX 0x435 #define DEVID_STM32C01XX 0x443 #define DEVID_STM32C03XX 0x453 +#define DEVID_STM32U53_U54XX 0x455 #define DEVID_STM32G05_G06XX 0x456 #define DEVID_STM32G07_G08XX 0x460 #define DEVID_STM32L49_L4AXX 0x461 ----------------------------------------------------------------------- Summary of changes: src/flash/nor/stm32l4x.c | 33 ++++++++++++++++++++++++++++++--- src/flash/nor/stm32l4x.h | 1 + 2 files changed, 31 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |