This is an automated email from Gerrit.

"Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/8734

-- gerrit

commit a697615a280322ef11ac415d276bc7401a99bc12
Author: Tomas Vanek <van...@fbl.cz>
Date:   Tue Jan 28 20:43:33 2025 +0100

    target/cortex_m: call adapter_deassert_reset() only if srst is configured
    
    Deasserting is useless if reset was not asserted except the very corner
    case: changed reset_config during reset processing.
    
    Change-Id: I1d1ea142980d67293daa348a2869b68ffd78d0eb
    Signed-off-by: Tomas Vanek <van...@fbl.cz>

diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index 2cea203a29..9314d6675f 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -1849,10 +1849,12 @@ static int cortex_m_deassert_reset(struct target 
*target)
                target_state_name(target),
                target_was_examined(target) ? "" : " not");
 
+       enum reset_types jtag_reset_config = jtag_get_reset_config();
+
        /* deassert reset lines */
-       adapter_deassert_reset();
+       if (jtag_reset_config & RESET_HAS_SRST)
+               adapter_deassert_reset();
 
-       enum reset_types jtag_reset_config = jtag_get_reset_config();
 
        if ((jtag_reset_config & RESET_HAS_SRST) &&
                !(jtag_reset_config & RESET_SRST_NO_GATING) &&

-- 

Reply via email to