This is an automated email from Gerrit.

Paul Fertser ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1404

-- gerrit

commit cf340929d1ad0f0b0508daebc17d103cb52acefd
Author: Paul Fertser <[email protected]>
Date:   Sat May 11 15:26:50 2013 +0400

    reset_config: default to srst_nogate for Cortex-M targets
    
    ARM DDI 0337E (Cortex-M3 TRM) 11.2 System debug access states:
    
    ``During a system reset the debugger can read all registers within the PPB
    space. It can also write to registers within the PPB space that are only
    reset by a power on reset.''
    
    For the overwhelming majority of usecases involving cortex-m (either a
    single or multiple cortex-m cores per JTAG chain) system reset does not
    prevent JTAG access so set this as default.
    
    Change-Id: I3768866579fc7e9185814a90edf6bd9c381fa9f9
    Signed-off-by: Paul Fertser <[email protected]>

diff --git a/doc/openocd.texi b/doc/openocd.texi
index bc92452..1e0d1df 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -3380,7 +3380,7 @@ haven't seen hardware with such a bug, and can be worked 
around).
 @item
 The @var{gates} tokens control flags that describe some cases where
 JTAG may be unvailable during reset.
-@option{srst_gates_jtag} (default)
+@option{srst_gates_jtag} (default unless a Cortex-M target is present)
 indicates that asserting SRST gates the
 JTAG clock. This means that no communication can happen on JTAG
 while SRST is asserted.
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index 6fba925..727531f 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -2027,6 +2027,8 @@ static int cortex_m3_init_arch_info(struct target *target,
 
        target_register_timer_callback(cortex_m3_handle_target_request, 1, 1, 
target);
 
+       jtag_set_reset_config(jtag_get_reset_config() | RESET_SRST_NO_GATING);
+
        retval = arm_jtag_setup_connection(&cortex_m3->jtag_info);
        if (retval != ERROR_OK)
                return retval;

-- 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to