Skip to content

Commit c88672c

Browse files
committed
fix: Don't shift BASEPTR0
BASEPTR0's field only needs masking of its lower bits.
1 parent 647fead commit c88672c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyocd/coresight/dap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def _check_version(self) -> None:
498498
baseptr0 = self.read_reg(DP_BASEPTR0)
499499
valid = (baseptr0 & BASEPTR0_VALID_MASK) != 0
500500
if valid:
501-
base = (baseptr0 & BASEPTR0_PTR_MASK) >> BASEPTR0_PTR_SHIFT
501+
base = baseptr0 & BASEPTR0_PTR_MASK
502502
if self._addr_size > 32:
503503
baseptr1 = self.read_reg(DP_BASEPTR1)
504504
base |= baseptr1 << 32

0 commit comments

Comments
 (0)