From 47e4a1b4373729c51c80e35d73b9ed7405e3a6da Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 30 Sep 2021 10:11:09 +0200 Subject: [PATCH] tools/litex_term: Avoid staying in safe mode on next upload when previous calibration failed. --- litex/tools/litex_term.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litex/tools/litex_term.py b/litex/tools/litex_term.py index 9d236aa09..cbcef414f 100755 --- a/litex/tools/litex_term.py +++ b/litex/tools/litex_term.py @@ -310,6 +310,7 @@ class LiteXTerm: signal.signal(signal.SIGINT, self.sigint) self.sigint_time_last = 0 + self.safe = safe self.delay = 0 self.length = 64 self.outstanding = 0 if safe else 128 @@ -435,11 +436,10 @@ class LiteXTerm: print(f"[LXTERM] Uploading {filename} to 0x{address:08x} ({length} bytes)...") # Upload calibration - if self.outstanding: + if not self.safe: self.upload_calibration(address) - # Force safe mode when calibration fails. + # Force safe mode settings when calibration fails. if self.delay is None: - self.delay = 0 self.length = 64 self.outstanding = 0