Commit 0cccdde3 authored by Spencer Oliver's avatar Spencer Oliver
Browse files

flash: stm32f2x incorrectly using 512 as max family size



Change-Id: I2bac348c6d0baabd3d88335c5aa0a318ef66653a
Signed-off-by: default avatarSpencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/353
Tested-by: jenkins
parent 04fe2ca5
...@@ -640,15 +640,15 @@ static int stm32x_probe(struct flash_bank *bank) ...@@ -640,15 +640,15 @@ static int stm32x_probe(struct flash_bank *bank)
/* check for early silicon */ /* check for early silicon */
if (flash_size_in_kb == 0xffff) { if (flash_size_in_kb == 0xffff) {
/* number of sectors may be incorrrect on early silicon */ /* number of sectors may be incorrrect on early silicon */
LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 512k flash"); LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 1024k flash");
flash_size_in_kb = 512; flash_size_in_kb = 1024;
} }
} else if ((device_id & 0xfff) == 0x413) { } else if ((device_id & 0xfff) == 0x413) {
/* check for early silicon */ /* check for early silicon */
if (flash_size_in_kb == 0xffff) { if (flash_size_in_kb == 0xffff) {
/* number of sectors may be incorrrect on early silicon */ /* number of sectors may be incorrrect on early silicon */
LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 512k flash"); LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 1024k flash");
flash_size_in_kb = 512; flash_size_in_kb = 1024;
} }
} else { } else {
LOG_WARNING("Cannot identify target as a STM32 family."); 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) ...@@ -747,6 +747,10 @@ static int get_stm32x_info(struct flash_bank *bank, char *buf, int buf_size)
snprintf(buf, buf_size, "A"); snprintf(buf, buf_size, "A");
break; break;
case 0x1001:
snprintf(buf, buf_size, "Z");
break;
default: default:
snprintf(buf, buf_size, "unknown"); snprintf(buf, buf_size, "unknown");
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment