diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 94b8b93a..0a8514cc 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -335,11 +335,20 @@ impl CrosEc { pub fn flash_version(&self) -> Option<(String, String, EcCurrentImage)> { // Unlock SPI - // TODO: Lock flash again again - let _data = EcRequestFlashNotify { flags: 0 }.send_command(self).ok()?; + let _data = EcRequestFlashNotify { + flags: MecFlashNotify::AccessSpi as u8, + } + .send_command(self) + .ok()?; let v = EcRequestGetVersion {}.send_command(self).ok()?; + // Lock SPI + let _ = EcRequestFlashNotify { + flags: MecFlashNotify::AccessSpiDone as u8, + } + .send_command(self); + let curr = match v.current_image { 1 => EcCurrentImage::RO, 2 => EcCurrentImage::RW,