From 82424b100b01533214c500fad355cf6ccad66c6e Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Mon, 3 Jun 2019 16:28:55 +0200 Subject: [PATCH] stlinkv2: Require STLINK V3 Rev > 2 as revision 1 can not read TARGETID. --- src/platforms/pc-stlinkv2/stlinkv2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platforms/pc-stlinkv2/stlinkv2.c b/src/platforms/pc-stlinkv2/stlinkv2.c index 22abafd..c9d2ba0 100644 --- a/src/platforms/pc-stlinkv2/stlinkv2.c +++ b/src/platforms/pc-stlinkv2/stlinkv2.c @@ -787,6 +787,9 @@ void stlink_init(int argc, char **argv) if (Stlink.ver_stlink < 3 && Stlink.ver_jtag < 32) { DEBUG("Please update Firmware\n"); goto error_1; + } else if (Stlink.ver_stlink == 3 && Stlink.ver_jtag < 3) { + DEBUG("Please update Firmware\n"); + goto error_1; } stlink_resetsys(); stlink_leave_state();