summaryrefslogtreecommitdiff
path: root/src/target/embeddedice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/embeddedice.c')
-rw-r--r--src/target/embeddedice.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c
index 699aa96f..76f87410 100644
--- a/src/target/embeddedice.c
+++ b/src/target/embeddedice.c
@@ -181,6 +181,15 @@ reg_cache_t* embeddedice_build_reg_cache(target_t *target, arm7_9_common_t *arm7
ERROR("unknown EmbeddedICE version (comms ctrl: 0x%8.8x)", buf_get_u32(reg_list[EICE_COMMS_CTRL].value, 0, 32));
}
+ /* explicitly disable monitor mode */
+ if (arm7_9->has_monitor_mode)
+ {
+ embeddedice_read_reg(&reg_list[EICE_DBG_CTRL]);
+ jtag_execute_queue();
+ buf_set_u32(reg_list[EICE_DBG_CTRL].value, 4, 1, 0);
+ embeddedice_set_reg_w_exec(&reg_list[EICE_DBG_CTRL], reg_list[EICE_DBG_CTRL].value);
+ }
+
return reg_cache;
}