]> git.sur5r.net Git - openocd/commitdiff
flash: stm32f2x incorrectly using 512 as max family size
authorSpencer Oliver <spen@spen-soft.co.uk>
Mon, 9 Jan 2012 12:44:48 +0000 (12:44 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 12 Jan 2012 20:46:17 +0000 (20:46 +0000)
Change-Id: I2bac348c6d0baabd3d88335c5aa0a318ef66653a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/353
Tested-by: jenkins
src/flash/nor/stm32f2x.c

index 4ae4304ec9cdfb0ddffa6ae997a7497dacf44027..6d97bc64f30ac28aadbe4af16d7907d6281a355d 100644 (file)
@@ -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;