aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2012-01-09 12:44:48 +0000
committerSpencer Oliver <spen@spen-soft.co.uk>2012-01-12 20:46:17 +0000
commit0cccdde3c726b1ec25fc27b23a6a700260dbf266 (patch)
tree308462ac2285edb737c5eec75db23217f104ca70 /src
parent04fe2ca5547f76686c7dc555f90510eed6fcc551 (diff)
downloadriscv-openocd-0cccdde3c726b1ec25fc27b23a6a700260dbf266.zip
riscv-openocd-0cccdde3c726b1ec25fc27b23a6a700260dbf266.tar.gz
riscv-openocd-0cccdde3c726b1ec25fc27b23a6a700260dbf266.tar.bz2
flash: stm32f2x incorrectly using 512 as max family size
Change-Id: I2bac348c6d0baabd3d88335c5aa0a318ef66653a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/353 Tested-by: jenkins
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/stm32f2x.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c
index 4ae4304..6d97bc6 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;