Fix memory config for STM32F4
[fw/stlink] / flash / main.c
index 8f5b351de3df57710eff7b05080dbe3a51689cdb..82803fe61e6b45bd4db01fe0cdd8bd62dc0bc20f 100644 (file)
@@ -137,8 +137,10 @@ int main(int ac, char** av)
     if (stlink_current_mode(sl) != STLINK_DEV_DEBUG_MODE)
         stlink_enter_swd_mode(sl);
 
-    if (o.reset)
+    if (o.reset){
+        stlink_jtag_reset(sl,2);
         stlink_reset(sl);
+    }
 
     // Disable DMA - Set All DMA CCR Registers to zero. - AKS 1/7/2013
     if (sl->chip_id == STM32_CHIPID_F4)
@@ -196,8 +198,10 @@ int main(int ac, char** av)
         }
     }
 
-    if (o.reset)
+    if (o.reset){
+        stlink_jtag_reset(sl,2);
         stlink_reset(sl);
+    }
 
     /* success */
     err = 0;