diff --git a/src/target/stm32f1.c b/src/target/stm32f1.c index b51f910ce2b..5b8c0601097 100644 --- a/src/target/stm32f1.c +++ b/src/target/stm32f1.c @@ -398,9 +398,10 @@ static void gd32vf1_detach(target_s *const target) bool gd32vw5_probe(target_s *const target) { const uint16_t device_id = target_mem32_read32(target, GD32E5_DBGMCU_BASE) & 0xfffU; - const uint32_t signature = target_mem32_read32(target, GD32Fx_FLASHSIZE); - const uint16_t flash_size = signature & 0xffffU; - const uint16_t ram_size = signature >> 16U; + /* Either 2 or 4 MiB of main SiP Flash */ + const uint16_t flash_size = 4096U; + /* SRAM0/1/2 each 64 KiB, SRAM3 128 KiB (96+32 shared) */ + const uint16_t ram_size = 320U; DEBUG_WARN("Stub for detection of GD32VW553. DBG_ID=0x%x, RAM=%u, flash=%u\n", device_id, ram_size, flash_size); target->driver = "GD32VW5"; target->part_id = device_id;