From 283143dbef835030f62952913103f35ade28dcd5 Mon Sep 17 00:00:00 2001 From: Miguel Osorio Date: Thu, 21 Dec 2023 19:45:39 -0800 Subject: [PATCH] [ottool] Apply rom_bootstrap before connecting to lc tap. Added to read_lc_state to make the call stable when ROM execution is enabled. Signed-off-by: Miguel Osorio --- sw/host/opentitanlib/src/test_utils/lc.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sw/host/opentitanlib/src/test_utils/lc.rs b/sw/host/opentitanlib/src/test_utils/lc.rs index 29706cc673fa4..2250c81799f6c 100644 --- a/sw/host/opentitanlib/src/test_utils/lc.rs +++ b/sw/host/opentitanlib/src/test_utils/lc.rs @@ -16,10 +16,15 @@ pub fn read_lc_state( reset_delay: Duration, ) -> Result { transport.pin_strapping("PINMUX_TAP_LC")?.apply()?; + + // Apply bootstrap pin to be able to connect to JTAG when ROM execution is + // enabled. + transport.pin_strapping("ROM_BOOTSTRAP")?.apply()?; transport.reset_target(reset_delay, true)?; let mut jtag = jtag_params.create(transport)?.connect(JtagTap::LcTap)?; let raw_lc_state = jtag.read_lc_ctrl_reg(&LcCtrlReg::LcState)?; jtag.disconnect()?; transport.pin_strapping("PINMUX_TAP_LC")?.remove()?; + transport.pin_strapping("ROM_BOOTSTRAP")?.remove()?; DifLcCtrlState::from_redundant_encoding(raw_lc_state) }