aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-03-21 17:14:37 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-03-21 17:20:11 -0700
commit09da0c812f896a74d3c6c84999483e94b90a6f6b (patch)
treea636e4a1a455e62b67e8d8542643d218a10fea7e
parent60338504151aeca5da2b287dc27e780fe73c6da7 (diff)
downloadriscv-openocd-09da0c812f896a74d3c6c84999483e94b90a6f6b.zip
riscv-openocd-09da0c812f896a74d3c6c84999483e94b90a6f6b.tar.gz
riscv-openocd-09da0c812f896a74d3c6c84999483e94b90a6f6b.tar.bz2
Clear autoexec correctly
-rw-r--r--src/target/riscv/riscv-013.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 8fc07ca..c8fc91b 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -1985,7 +1985,7 @@ static int write_memory(struct target *target, uint32_t address,
int dmi_error = check_dmi_error(target);
// Clear autoexec.
- dmi_write(target, DMI_ABSTRACTCS, DMI_ABSTRACTCS_CMDERR);
+ dmi_write(target, DMI_ABSTRACTAUTO, 0);
uint32_t abstractcs = dmi_read(target, DMI_ABSTRACTCS);
unsigned cmderr = get_field(abstractcs, DMI_ABSTRACTCS_CMDERR);
if (cmderr == CMDERR_BUSY) {