Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sival] Add option to skip reset on lc state read. #25651

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion sw/host/opentitantool/src/command/lc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ pub struct LcStateRead {

#[command(flatten)]
pub jtag_params: JtagParams,

// Skip device reset before connecting to LC controller. This is only
// applicable for lifecycle states that support PINMUX_TAP continuous
// sampling.
#[arg(short, long, action = clap::ArgAction::Set, default_value = "false")]
pub skip_reset: bool,
}

impl CommandDispatch for LcStateRead {
Expand All @@ -89,7 +95,13 @@ impl CommandDispatch for LcStateRead {
) -> Result<Option<Box<dyn Annotate>>> {
// Set the TAP straps for the lifecycle controller and reset.
transport.pin_strapping("PINMUX_TAP_LC")?.apply()?;
transport.reset_target(self.reset_delay, true)?;

if !self.skip_reset {
transport.reset_target(self.reset_delay, true)?;
} else {
// Unconditionally wait for the device to switch tap.
std::thread::sleep(Duration::from_millis(10));
}

// Spawn an OpenOCD process and connect to the LC JTAG TAP.
let mut jtag = self
Expand Down
Loading