This is an automated email from Gerrit.

Karl Palsson (ka...@tweak.net.au) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4198

-- gerrit

commit 010a2b1e7ed7f2a969ce76d9e1b52f8c237f7ab5
Author: Karl Palsson <ka...@tweak.net.au>
Date:   Wed Aug 9 17:11:29 2017 +0000

    stm32l1: Devid 0x429 only has 8bit flash size register
    
    A footnote in RM0038r14.
    
    Change-Id: Ic31894d846fbbe917a7290b2b7ff8fb582bb65da
    Signed-off-by: Karl Palsson <ka...@tweak.net.au>

diff --git a/src/flash/nor/stm32lx.c b/src/flash/nor/stm32lx.c
index e4f499d..0c2fddc 100644
--- a/src/flash/nor/stm32lx.c
+++ b/src/flash/nor/stm32lx.c
@@ -790,6 +790,11 @@ static int stm32lx_probe(struct flash_bank *bank)
                        flash_size_in_kb = 256;
        }
 
+       /* 0x429 devices only use the lowest 8 bits of the flash size register 
*/
+       if (retval == ERROR_OK && (device_id & 0xfff) == 0x429) {
+               flash_size_in_kb &= 0xff;
+       }
+
        /* Failed reading flash size or flash size invalid (early silicon),
         * default to max target family */
        if (retval != ERROR_OK || flash_size_in_kb == 0xffff || 
flash_size_in_kb == 0) {

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to