From: Spencer Oliver Date: Mon, 9 Jan 2012 12:44:48 +0000 (+0000) Subject: flash: stm32f2x incorrectly using 512 as max family size X-Git-Tag: v0.6.0-rc1~314 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0cccdde3c726b1ec25fc27b23a6a700260dbf266;p=openocd flash: stm32f2x incorrectly using 512 as max family size Change-Id: I2bac348c6d0baabd3d88335c5aa0a318ef66653a Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/353 Tested-by: jenkins --- diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c index 4ae4304e..6d97bc64 100644 --- a/src/flash/nor/stm32f2x.c +++ b/src/flash/nor/stm32f2x.c @@ -640,15 +640,15 @@ static int stm32x_probe(struct flash_bank *bank) /* check for early silicon */ if (flash_size_in_kb == 0xffff) { /* number of sectors may be incorrrect on early silicon */ - LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 512k flash"); - flash_size_in_kb = 512; + LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 1024k flash"); + flash_size_in_kb = 1024; } } else if ((device_id & 0xfff) == 0x413) { /* check for early silicon */ if (flash_size_in_kb == 0xffff) { /* number of sectors may be incorrrect on early silicon */ - LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 512k flash"); - flash_size_in_kb = 512; + LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 1024k flash"); + flash_size_in_kb = 1024; } } else { LOG_WARNING("Cannot identify target as a STM32 family."); @@ -747,6 +747,10 @@ static int get_stm32x_info(struct flash_bank *bank, char *buf, int buf_size) snprintf(buf, buf_size, "A"); break; + case 0x1001: + snprintf(buf, buf_size, "Z"); + break; + default: snprintf(buf, buf_size, "unknown"); break;