fix: Improve OpenOCD stability for P550 reboot
- Add explicit 'adapter speed' to fix low-speed warning. - Separate nSRST and nTRST handling in 'reset_config' to prevent JTAG communication timeouts ('mpsse_flush' errors).
This commit is contained in:
parent
780d7851a7
commit
7ea9888a5d
|
@ -1,4 +1,4 @@
|
||||||
# OpenOCD Configuration to REBOOT a SiFive HiFive Pro P550 Board (v2)
|
# OpenOCD Configuration to REBOOT a SiFive HiFive Pro P550 Board (v3)
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# 1. Adapter and Board Configuration
|
# 1. Adapter and Board Configuration
|
||||||
|
@ -6,6 +6,12 @@
|
||||||
adapter driver ftdi
|
adapter driver ftdi
|
||||||
ftdi channel 2
|
ftdi channel 2
|
||||||
ftdi vid_pid 0x0403 0x6011
|
ftdi vid_pid 0x0403 0x6011
|
||||||
|
|
||||||
|
# NEW: Set the JTAG clock speed.
|
||||||
|
# Start with a conservative but reasonable speed. 1000 kHz = 1 MHz.
|
||||||
|
# If this works, you can try increasing it to 5000 or 10000 for faster performance.
|
||||||
|
adapter speed 1000
|
||||||
|
|
||||||
ftdi layout_init 0x0808 0x0a1b
|
ftdi layout_init 0x0808 0x0a1b
|
||||||
ftdi layout_signal nSRST -oe 0x0200
|
ftdi layout_signal nSRST -oe 0x0200
|
||||||
ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
|
ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
|
||||||
|
@ -27,18 +33,16 @@ target smp riscv.cpu0 riscv.cpu1 riscv.cpu2 riscv.cpu3
|
||||||
# 3. Reset Configuration and Execution
|
# 3. Reset Configuration and Execution
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
# Configure the reset signal.
|
# MODIFIED: Changed the reset configuration.
|
||||||
# srst_only: Asserts only nSRST.
|
# By removing 'srst_pulls_trst', we are telling OpenOCD to handle the
|
||||||
# srst_pulls_trst: Informs OpenOCD that nSRST and nTRST are connected.
|
# JTAG reset (nTRST) and the system reset (nSRST) as separate signals.
|
||||||
# srst_assert_width: Hold the reset signal for 100ms (a good, long pulse).
|
# This is often more reliable on complex SoCs.
|
||||||
# srst_deassert_delay: Wait 100ms after releasing reset for the system to stabilize.
|
reset_config srst_only srst_assert_width 100 srst_deassert_delay 100
|
||||||
reset_config srst_only srst_pulls_trst srst_assert_width 100 srst_deassert_delay 100
|
|
||||||
|
|
||||||
# Initialize OpenOCD and connect to the target
|
# Initialize OpenOCD and connect to the target
|
||||||
init
|
init
|
||||||
|
|
||||||
# --- The Improved Reboot Sequence ---
|
# --- The Improved Reboot Sequence ---
|
||||||
# This is the most reliable way to gain control and issue a reset.
|
|
||||||
# 'reset halt' asserts the reset line, then immediately halts the cores
|
# 'reset halt' asserts the reset line, then immediately halts the cores
|
||||||
# as they come out of reset, before they can execute any code.
|
# as they come out of reset, before they can execute any code.
|
||||||
echo "!!! Issuing reset halt to gain control..."
|
echo "!!! Issuing reset halt to gain control..."
|
||||||
|
|
Loading…
Reference in New Issue