From b0985bbd57bb9f7cbfe16b96657af3a926ac8d89 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Buchillon Date: Tue, 8 Dec 2020 13:27:12 -0800 Subject: stm32uart: add delay after reading This implementation of the uart reading code lacks the fix inside hdctools that adds a delay here. Amend the code. BUG=chromium:1152838 BRANCH=None TEST=sudo servo_updater --board servo_micro TEST=sudo servo_updater --board sweetberry TEST=sudo servo_updater --board servo_micro --force Change-Id: I28f62f4553c726f1e63c7404508a5e59ce098990 Signed-off-by: Ruben Rodriguez Buchillon Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2580853 Reviewed-by: Garry Wang Reviewed-by: Otabek Kasimov (cherry picked from commit 315bc0f14ddab736e06d26a9c2f3cb2828910658) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2585856 --- extra/tigertool/ecusb/stm32uart.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/tigertool/ecusb/stm32uart.py b/extra/tigertool/ecusb/stm32uart.py index cfbbf485a4..fa0ed96820 100644 --- a/extra/tigertool/ecusb/stm32uart.py +++ b/extra/tigertool/ecusb/stm32uart.py @@ -113,6 +113,9 @@ class Suart(object): if not events: try: r = os.read(self._ptym, 64) + # TODO(crosbug.com/936182): Remove when the servo v4/micro console + # issues are fixed. + time.sleep(0.001) if r: self._susb._write_ep.write(r, self._susb.TIMEOUT_MS) -- cgit v1.2.1