Commit 420a692e authored by Antonio Borneo's avatar Antonio Borneo Committed by Tomas Vanek
Browse files

target/adi_v5_swd: update cached value on write to DP_SELECT

When the register DP_SELECT is written directly, e.g. with command
	<dap> dpreg 8 <value>
the cached value in OpenOCD is not completely updated with the new
value, thus creating issues in the following AP and DP read/write
that rely on the cached value.

Update the cached value while writing to DP_SELECT.

Change-Id: I8221b10cd6fc1fbe73e6b834b68820b43480e1a2
Signed-off-by: default avatarAntonio Borneo <>

Tested-by: jenkins
Reviewed-by: default avatarTomas Vanek <>
parent 380502d8
......@@ -211,7 +211,10 @@ static int swd_queue_dp_write(struct adiv5_dap *dap, unsigned reg,
return retval;
swd_queue_dp_bankselect(dap, reg);
if (reg == DP_SELECT)
swd_queue_dp_bankselect(dap, reg);
swd->write_reg(swd_cmd(false, false, reg), data, 0);
return check_sync(dap);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment