This documents the effort is root-cuasing the infamous all-FF SFDP error which happens randomly for seemingly no reason on some boards.
What to do:
- make note on which branch you are
- apply the diff below and rerun
| diff --git i/sw/host/opentitanlib/src/bootstrap/eeprom.rs w/sw/host/opentitanlib/src/bootstrap/eeprom.rs | |
| index 309c3cd3d1..147acf1a27 100644 | |
| --- i/sw/host/opentitanlib/src/bootstrap/eeprom.rs | |
| +++ w/sw/host/opentitanlib/src/bootstrap/eeprom.rs | |
| @@ -8,6 +8,7 @@ use crate::app::TransportWrapper; | |
| use crate::bootstrap::{Bootstrap, UpdateProtocol}; | |
| use crate::spiflash::SpiFlash; | |
| use crate::transport::{Capability, ProgressIndicator}; | |
| +use crate::uart::console::UartConsole; | |
| /// Implements the SPI EEPROM bootstrap protocol. | |
| pub struct Eeprom; | |
| @@ -44,6 +45,9 @@ impl UpdateProtocol for Eeprom { | |
| payload: &[u8], | |
| progress: &dyn ProgressIndicator, | |
| ) -> Result<()> { | |
| + let uart = transport.uart("console")?; | |
| + UartConsole::wait_for(&*uart, r"ROM:", std::time::Duration::from_secs(1))?; | |
| + UartConsole::wait_for(&*uart, r"bootstrap:1", std::time::Duration::from_secs(1))?; | |
| let spi = container.spi_params.create(transport, "BOOTSTRAP")?; | |
| let flash = SpiFlash::from_spi(&*spi)?; | |
| flash.chip_erase(&*spi)?; |
This documents the effort is root-cuasing the infamous all-FF SFDP error which happens randomly for seemingly no reason on some boards.
What to do: