This is an automated email from Gerrit.

Andrey Yurovsky ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1519

-- gerrit

commit 2bca3bd395508a51e4058894640835daaadf5be3
Author: Andrey Yurovsky <[email protected]>
Date:   Mon Jul 22 10:56:08 2013 -0700

    stm32f flash: detect and handle new STM32F401 part
    
    The STM32F401 is very similar to the STM32F405/407 however it has a
    unique device ID, 0x423, and a 256K max flash size.  Early silicon is
    unlikely to have the flash ID register programmed correctly but the
    catch-all case will set the size to the correct 256K and reflashing
    works consistently from there via the existing code paths (tested on a
    modified STM32F4 discovery board).
    
    Change-Id: Ibf2857ab7dfa5118df92a11162afe985b7daaddc
    Signed-off-by: Andrey Yurovsky <[email protected]>

diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c
index dbecc26..e6c7929 100644
--- a/src/flash/nor/stm32f2x.c
+++ b/src/flash/nor/stm32f2x.c
@@ -601,6 +601,9 @@ static int stm32x_probe(struct flash_bank *bank)
        case 0x413:
                max_flash_size_in_kb = 1024;
                break;
+       case 0x423:
+               max_flash_size_in_kb = 256;
+               break;
        default:
                LOG_WARNING("Cannot identify target as a STM32 family.");
                return ERROR_FAIL;
@@ -717,6 +720,10 @@ static int get_stm32x_info(struct flash_bank *bank, char 
*buf, int buf_size)
                                snprintf(buf, buf_size, "unknown");
                                break;
                }
+       } else if ((device_id & 0xfff) == 0x423) {
+               printed = snprintf(buf, buf_size, "stm32f401");
+               buf += printed;
+               buf_size -= printed;
        } else {
                snprintf(buf, buf_size, "Cannot identify target as a stm32x\n");
                return ERROR_FAIL;

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to