faft: Adjust delay in triggering recovery mode
Current delay for cold resetting the device is too long, so if the
device has software sync and is in twostop mode, EC will go into RW and
EC_IN_RW signal will be asserted. This CL shorten the delay to prevent
EC from going to RW.
BUG=chrome-os-partner:12944
TEST=Check we can switch to developer mode
Change-Id: Ib752f974eb603cd921cbbc606669587b2a842e20
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31920
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index 69f96b5..beeefe8 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -107,8 +107,10 @@
POWER_BTN_DELAY = 0.5
# Delay of EC software sync hash calculating time
SOFTWARE_SYNC_DELAY = 6
- # Delay between EC boot and EC console functional
- EC_BOOT_DELAY = 2
+ # Delay between EC boot and ChromeEC console functional
+ EC_BOOT_DELAY = 0.5
+ # Duration of holding cold_reset to reset device
+ COLD_RESET_DELAY = 0.1
# The developer screen timeouts fit our spec.
DEV_SCREEN_TIMEOUT = 30
@@ -882,7 +884,10 @@
os.system(self._customized_rec_reboot_command)
elif self.client_attr.chrome_ec:
# Cold reset to clear EC_IN_RW signal
- self.servo.cold_reset()
+ self.servo.set('cold_reset', 'on')
+ time.sleep(self.COLD_RESET_DELAY)
+ self.servo.set('cold_reset', 'off')
+ time.sleep(self.EC_BOOT_DELAY)
self.send_uart_command("reboot ap-off")
time.sleep(self.EC_BOOT_DELAY)
self.send_uart_command("hostevent set 0x4000")