Hello Antonio,
Thank you for your reply.
21.01.22 16:48, Antonio Borneo пише:
But as you report after the commit
6c0151623cb09da6a80655cedf568db927ae2d93 there is something weird.
First of all, please try with the additional parameter
"srst_gates_jtag" to command "reset_config".
It should be the default, but I don't know if your board config file
sets "srst_nogate" that will not work for you.
If the above does not help, try to swap in aarch64_deassert_reset() the lines
a) retval = aarch64_poll(target);
b) retval = aarch64_init_debug_access(target);
Before the "bad" commit the order was a) then b), which is illogical
because we cannot poll the target if the debug port is not
initialized.
After the commit the order is b) then a).
I suspect that running b) as first is not able to fully initialize the
debug port after a power cycle. The old illogical code probably causes
a) to fail, forcing b) to well initialize the debug port.
I've tried with next changes:
diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index 30ef54792..76ef43a13 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -2000,11 +2000,11 @@static int aarch64_deassert_reset(struct target
*target)
if (!target_was_examined(target))
return ERROR_OK;
- retval = aarch64_init_debug_access(target);
+retval = aarch64_poll(target);
if (retval != ERROR_OK)
return retval;
- retval = aarch64_poll(target);
+retval = aarch64_init_debug_access(target);
if (retval != ERROR_OK)
return retval;
reset_config trst_and_srst srst_gates_jtag
Result is the same:
reset halt
JTAG tap: soc.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd),
part: 0xba00, ver: 0x5)
Debug regions are unpowered, an unexpected reset might have happened
JTAG-DP STICKY ERROR
soc.cpu0: Target not examined, will not halt immediately after reset!
TARGET: soc.cpu0 - Not halted