X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstlink-sg.c;h=3d4a9b79882a9d3959732253b8d4dede9a82da27;hb=40c9d08c6072237b1fb0a8bc86668de81d9068b8;hp=991bc878b5bb77ccb82ec8fd28bcb6ee73ed4fb6;hpb=2e6f2b6a65333fa36ece04fb99d25f579a04a23b;p=fw%2Fstlink diff --git a/src/stlink-sg.c b/src/stlink-sg.c index 991bc87..3d4a9b7 100644 --- a/src/stlink-sg.c +++ b/src/stlink-sg.c @@ -1014,6 +1014,7 @@ stlink_t* stlink_v1_open_inner(const int verbose) { "WTF? successfully opened, but unable to read version details. BROKEN!\n"); return NULL; } + return sl; } @@ -1025,6 +1026,9 @@ stlink_t* stlink_v1_open(const int verbose) { } // by now, it _must_ be fully open and in a useful mode.... stlink_enter_swd_mode(sl); + /* Now we are ready to read the parameters */ + stlink_reset(sl); + stlink_load_device_params(sl); ILOG("Successfully opened a stlink v1 debugger\n"); return sl; }