From: Uwe Bonnes Date: Tue, 13 Dec 2011 16:48:54 +0000 (+0100) Subject: Determine the device parameters explicit after running X-Git-Url: https://git.gag.com/?p=fw%2Fstlink;a=commitdiff_plain;h=5eda4566d617fedd2a9d3020ddae06b394d08a5f Determine the device parameters explicit after running stlink_reset(). Otherwise a sleeping device (WFI) doesn't return the parameters. --- diff --git a/flash/main.c b/flash/main.c index 9033b17..609a6f7 100644 --- a/flash/main.c +++ b/flash/main.c @@ -108,6 +108,7 @@ int main(int ac, char** av) stlink_enter_swd_mode(sl); stlink_reset(sl); + stlink_load_device_params(sl); if (o.do_read == 0) /* write */ { diff --git a/src/stlink-sg.c b/src/stlink-sg.c index 197d59b..991bc87 100644 --- a/src/stlink-sg.c +++ b/src/stlink-sg.c @@ -1025,7 +1025,6 @@ 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); - stlink_load_device_params(sl); ILOG("Successfully opened a stlink v1 debugger\n"); return sl; } diff --git a/src/stlink-usb.c b/src/stlink-usb.c index 4f8debc..f0a4695 100644 --- a/src/stlink-usb.c +++ b/src/stlink-usb.c @@ -702,7 +702,6 @@ stlink_t* stlink_open_usb(const int verbose) { } stlink_version(sl); - stlink_load_device_params(sl); error = 0;