Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move reset/load_param in the open functions, as requested by Karl

  • Loading branch information...
commit 7eb080490ce34e3daf6e0ab10743113acbc5a635 1 parent 82c638e
@UweBonnes UweBonnes authored
View
3  flash/main.c
@@ -107,9 +107,6 @@ int main(int ac, char** av)
if (stlink_current_mode(sl) != STLINK_DEV_DEBUG_MODE)
stlink_enter_swd_mode(sl);
- stlink_reset(sl);
- stlink_load_device_params(sl);
-
if (o.do_read == 0) /* write */
{
err = stlink_fwrite_flash(sl, o.filename, o.addr);
View
2  gdbserver/gdb-server.c
@@ -160,8 +160,6 @@ int main(int argc, char** argv) {
break;
}
- stlink_reset(sl);
- stlink_load_device_params(sl);
printf("Chip ID is %08x, Core ID is %08x.\n", sl->chip_id, sl->core_id);
sl->verbose=0;
View
2  src/stlink-sg.c
@@ -985,6 +985,8 @@ stlink_t* stlink_v1_open_inner(const int verbose) {
return NULL;
}
+ stlink_reset(sl);
+ stlink_load_device_params(sl);
stlink_version(sl);
if ((sl->version.st_vid != USB_ST_VID) || (sl->version.stlink_pid != USB_STLINK_PID)) {
ugly_log(UERROR, LOG_TAG,
View
2  src/stlink-usb.c
@@ -701,6 +701,8 @@ stlink_t* stlink_open_usb(const int verbose) {
stlink_enter_swd_mode(sl);
}
+ stlink_reset(sl);
+ stlink_load_device_params(sl);
stlink_version(sl);
error = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.