From 61d3f84403aa99546b672c8beabdb40f547d91c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 22 Mar 2021 11:56:55 +0100 Subject: [PATCH] application: improve JTAG scan --- application.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/application.c b/application.c index a04a188..58ec825 100644 --- a/application.c +++ b/application.c @@ -441,11 +441,13 @@ static void command_jtag_scan(void* argument) continue; // any other data on the line should be noise } else if (0 == jtag_tdo[tdo] || UINT32_MAX == jtag_tdo[tdo]) { // no IDCODE received (line constant low or pulled up idcode[tdo] = false; - } else if (0 == (jtag_tdo[tdo] & 0x1)) { // RAO bit is wrong - continue; } else { // IDCODE received printf("\nIDCODE found: TCK=CH%02u TMS=CH%02u TDO=CH%02u CHAIN=%u IDCODE=%+08x (", tck, tms, tdo, idcodes[tdo] + 1, jtag_tdo[tdo]); // show finding - print_idcode(jtag_tdo[tdo]); + if (jtag_tdo[tdo] & 0x1) { // RAO bit is wrong + print_idcode(jtag_tdo[tdo]); + } else { // RAO bit 0 is wrong + puts("invalid"); + } puts(")"); idcodes[tdo]++; // count the number of IDCODEs found tck_ok[tck] = true; // remember we found TCK on this channel