Do not issue JTAG reset on stlink-v1
@@ -92,10 +92,12 @@ int main(int ac, char** av)
}
if (o.reset){
+ if (sl->version.stlink_v > 1) {
if (stlink_jtag_reset(sl, 2)) {
printf("Failed to reset JTAG\n");
goto on_error;
}
+ }
if (stlink_reset(sl)) {
printf("Failed to reset device\n");
@@ -185,10 +187,12 @@ int main(int ac, char** av)
}
} else if (o.cmd == CMD_RESET)
{
+ if (sl->version.stlink_v > 1) {
if (stlink_jtag_reset(sl, 2)) {
printf("Failed to reset JTAG\n");
goto on_error;
}
+ }
if (stlink_reset(sl)) {
printf("Failed to reset device\n");
@@ -212,7 +216,7 @@ int main(int ac, char** av)
}
if (o.reset){
- stlink_jtag_reset(sl,2);
+ if (sl->version.stlink_v > 1) stlink_jtag_reset(sl, 2);
stlink_reset(sl);
}
