X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Fadi_v5_jtag.c;h=78489aab350f5908bc8c8984605e4ccc2ac00c75;hp=ad6ef3c7a55243a351848f1ac38b1278e0f35e50;hb=b8be5de75d021b5e01a6739fc70c793a6603467c;hpb=95486fb1594b2a876bead7512fa18b305192a078 diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index ad6ef3c7a5..78489aab35 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -271,7 +271,8 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap) if (ctrlstat & (SSTICKYORUN | SSTICKYERR)) { LOG_DEBUG("jtag-dp: CTRL/STAT error, 0x%" PRIx32, ctrlstat); /* Check power to debug regions */ - if ((ctrlstat & 0xf0000000) != 0xf0000000) { + if ((ctrlstat & (CDBGPWRUPREQ | CDBGPWRUPACK | CSYSPWRUPREQ | CSYSPWRUPACK)) != + (CDBGPWRUPREQ | CDBGPWRUPACK | CSYSPWRUPREQ | CSYSPWRUPACK)) { LOG_ERROR("Debug regions are unpowered, an unexpected reset might have happened"); return ERROR_JTAG_DEVICE_ERROR; } else {