aboutsummaryrefslogtreecommitdiff
path: root/src/rtt/tcl.c
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2024-05-17 21:27:24 +0200
committerTomas Vanek <vanekt@fbl.cz>2024-06-17 14:04:49 +0000
commit4892e32294c6ea4cf53251adb81dee4e85aee0b0 (patch)
treeefb5246a23a6b87721265f45b45912c68e841877 /src/rtt/tcl.c
parentbf4be566a7e7f510977533a0402716d92f208f95 (diff)
downloadriscv-openocd-4892e32294c6ea4cf53251adb81dee4e85aee0b0.zip
riscv-openocd-4892e32294c6ea4cf53251adb81dee4e85aee0b0.tar.gz
riscv-openocd-4892e32294c6ea4cf53251adb81dee4e85aee0b0.tar.bz2
target/cortex_m: allow poll quickly get out of TARGET_RESET state
cortex_m_poll_one() detects reset testing S_RESET_ST sticky bit. If the signal comes unexpectedly, poll must return TARGET_RESET state. On the contrary in case of polling inside of an OpenOCD reset command, TARGET_RESET has been has already been set and we need to get out of it as quickly as possible. The original code needs 2 polls: the first clears S_RESET_ST and keeps TARGET_RESET state, the current TARGET_RUNNING or TARGET_HALTED is reflected as late as the second poll is done. Change the logic to keep in TARGET_RESET only when necessary. See also [1] Link: [1] 8284: tcl/target: ti_cc3220sf: Use halt for CC3320SF targets | https://review.openocd.org/c/openocd/+/8284 Fixes: https://sourceforge.net/p/openocd/tickets/360/ Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: I759461e5f89ca48a6e16e4b4101570260421dba1 Reviewed-on: https://review.openocd.org/c/openocd/+/8285 Tested-by: jenkins Reviewed-by: Dhruva Gole <d-gole@ti.com>
Diffstat (limited to 'src/rtt/tcl.c')
0 files changed, 0 insertions, 0 deletions