This is an automated email from Gerrit.

"Bohdan Tymkiv <bohdan...@gmail.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/7693

-- gerrit

commit 139ffffafa2899dcf3c5a9b5742ff171ae83bfdb
Author: Bohdan Tymkiv <bohdan...@gmail.com>
Date:   Tue May 23 11:58:29 2023 +0300

    cortex_m: fix reading of DCB_DSCSR register
    
    Read should be atomic since the result is required immediately
    
    Change-Id: I44959e882dbafb1b9779e813c3d13f3b3dbcd47f
    Signed-off-by: Bohdan Tymkiv <bohdan...@gmail.com>

diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index 8e55014f9b..aeefef7f5b 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -805,7 +805,7 @@ static int cortex_m_debug_entry(struct target *target)
        if (armv7m->arm.arch == ARM_ARCH_V8M) {
                uint32_t dscsr;
 
-               retval = mem_ap_read_u32(armv7m->debug_ap, DCB_DSCSR, &dscsr);
+               retval = mem_ap_read_atomic_u32(armv7m->debug_ap, DCB_DSCSR, 
&dscsr);
                if (retval != ERROR_OK)
                        return retval;
 

-- 

Reply via email to