diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2010-01-31 00:26:21 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2010-01-31 00:26:21 -0800 |
commit | e11ce3e6b00f02eba9a15673a54f5345eba8398b (patch) | |
tree | 08f1881d9f7d82093af53c404c3ab9bdaf36c3ff | |
parent | 695666d294e7d572bc5799e0cef4fc384b28c733 (diff) | |
download | openocd+libswd-e11ce3e6b00f02eba9a15673a54f5345eba8398b.tar.gz openocd+libswd-e11ce3e6b00f02eba9a15673a54f5345eba8398b.tar.bz2 openocd+libswd-e11ce3e6b00f02eba9a15673a54f5345eba8398b.tar.xz openocd+libswd-e11ce3e6b00f02eba9a15673a54f5345eba8398b.zip |
Subject: ADIv5: fix more diagnostics
If the MEM-AP cache is invalid, don't display it; just report that
invalidity as an error. (This bug has been observed with "mdw 0 32"
after just a "reset halt". Some code is being wrongly bypassed...)
If it's valid, display that cache at DEBUG level, not ERROR. Also,
don't assume it's an AHB-AP; it could be another flavor of MEM-AP.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-rw-r--r-- | src/target/arm_adi_v5.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 0e3b3495..bfa5cb42 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -321,27 +321,34 @@ int jtagdp_transaction_endcheck(struct swjdp_common *swjdp) } } + /* REVISIT also STICKYCMP, for pushed comparisons (nyet used) */ + /* Check for STICKYERR and STICKYORUN */ if (ctrlstat & (SSTICKYORUN | SSTICKYERR)) { LOG_DEBUG("jtag-dp: CTRL/STAT error, 0x%" PRIx32, ctrlstat); /* Check power to debug regions */ if ((ctrlstat & 0xf0000000) != 0xf0000000) - { ahbap_debugport_init(swjdp); - } else { uint32_t mem_ap_csw, mem_ap_tar; - /* Print information about last AHBAP access */ - LOG_ERROR("AHBAP Cached values: dp_select 0x%" PRIx32 - ", ap_csw 0x%" PRIx32 ", ap_tar 0x%" PRIx32, - swjdp->dp_select_value, swjdp->ap_csw_value, - swjdp->ap_tar_value); + /* Maybe print information about last MEM-AP access */ + if (swjdp->ap_tar_value != (uint32_t) -1) + LOG_DEBUG("MEM-AP Cached values: " + "ap_bank 0x%" PRIx32 + ", ap_csw 0x%" PRIx32 + ", ap_tar 0x%" PRIx32, + swjdp->dp_select_value, + swjdp->ap_csw_value, + swjdp->ap_tar_value); + else + LOG_ERROR("Invalid MEM-AP TAR cache!"); + if (ctrlstat & SSTICKYORUN) - LOG_ERROR("JTAG-DP OVERRUN - " - "check clock or reduce jtag speed"); + LOG_ERROR("JTAG-DP OVERRUN - check clock, " + "memaccess, or reduce jtag speed"); if (ctrlstat & SSTICKYERR) LOG_ERROR("JTAG-DP STICKY ERROR"); |