Skip to content

Commit

Permalink
[manuf] switch back to LC TAP after loading individ FW
Browse files Browse the repository at this point in the history
THe FT individualization firmware is loaded over the RISC-V JTAG TAP
into SRAM. After loading the firmware, we now switch back to the LC TAP
in case we experience any OTP pogramming errors. This makes it easier to
debug the LC state.

Signed-off-by: Tim Trippel <[email protected]>
  • Loading branch information
timothytrippel committed Jan 23, 2025
1 parent 802c496 commit 067b5c7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sw/host/provisioning/ft_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ pub fn run_sram_ft_individualize(
_ => panic!("SRAM program load/execution failed: {:?}.", result),
}

// Switch TAP straps to LC TAP (without resetting) to aid debugging if there are OTP issues.
// TAP straps are continuously sampled in TEST_UNLOCKED* LC states.
jtag.disconnect()?;
transport.pin_strapping("PINMUX_TAP_RISCV")?.remove()?;
transport.pin_strapping("PINMUX_TAP_LC")?.apply()?;

// Wait for SRAM program to complete execution.
let _ = UartConsole::wait_for(
spi_console,
Expand All @@ -124,14 +130,8 @@ pub fn run_sram_ft_individualize(
timeout,
)?;
match console_text[0].as_str() {
"FT SRAM provisioning done." => {
jtag.disconnect()?;
transport.pin_strapping("PINMUX_TAP_RISCV")?.remove()?;
Ok(())
}
"FT SRAM provisioning done." => Ok(()),
"Processing Alert NMI 10 ..." => {
transport.pin_strapping("PINMUX_TAP_RISCV")?.remove()?;
jtag.disconnect()?;
thread::sleep(Duration::from_millis(10000));
read_reset_reason(transport, jtag_params)?;
read_cpu_crashdump_data(transport, jtag_params)?;
Expand Down

0 comments on commit 067b5c7

Please sign in to comment.