add VCT6 support (chip_id 0x427) based on upstream patch by Burns master
authorBdale Garbee <bdale@gag.com>
Mon, 9 Dec 2013 23:58:15 +0000 (16:58 -0700)
committerBdale Garbee <bdale@gag.com>
Mon, 9 Dec 2013 23:58:15 +0000 (16:58 -0700)
src/stlink-common.c
src/stlink-common.h

index a73801b169a036f428bee9792d4e94a6c4e24010..29ca794833698fd57bb874f1e0d6b10d2fd6e297 100644 (file)
@@ -841,7 +841,7 @@ on_error:
     return error;
 }
 
-#define IS_STM32L(sl)  ((sl)->chip_id == STM32_CHIPID_L1_MEDIUM || (sl)->chip_id == STM32_CHIPID_L1_HIGH)
+#define IS_STM32L(sl)  ((sl)->chip_id == STM32_CHIPID_L1_MEDIUM || (sl)->chip_id == STM32_CHIPID_L1_MEDIUM_PLUS || (sl)->chip_id == STM32_CHIPID_L1_HIGH)
 
 int stlink_fread(stlink_t* sl, const char* path, stm32_addr_t addr, size_t size) {
     /* read size bytes from addr to file */
index 2d699359e7bc8b2eb23beb74f68575290db6b976..3c8dbf49da881b21654cb056848e2797ec36b3e6 100644 (file)
@@ -100,6 +100,7 @@ extern "C" {
 #define STM32_CHIPID_F4 0x413
 #define STM32_CHIPID_F1_HIGH 0x414
 #define STM32_CHIPID_L1_MEDIUM 0x416
+#define STM32_CHIPID_L1_MEDIUM_PLUS 0x427
 #define STM32_CHIPID_L1_HIGH 0x436
 #define STM32_CHIPID_F1_CONN 0x418
 #define STM32_CHIPID_F1_VL_MEDIUM 0x420
@@ -205,6 +206,17 @@ extern "C" {
                     .bootrom_base = 0x1ffff000,
                     .bootrom_size = 0x800
         },
+        {
+          // This ignores the EEPROM! (and uses the page erase size,
+          // not the sector write protection...)
+            .chip_id = 0x427,
+                    .description = "L1 Med-density device plus",
+                    .flash_size_reg = 0x1ff800cc,
+                    .flash_pagesize = 0x100,
+                    .sram_size = 0x8000,
+                    .bootrom_base = 0x1ff00000,
+                    .bootrom_size = 0x1000
+        },
         {
             .chip_id = 0x428,
                     .description = "F1 High-density value line device",