tools/litex_term: Avoid staying in safe mode on next upload when previous calibration failed.

This commit is contained in:
Florent Kermarrec 2021-09-30 10:11:09 +02:00
parent 4563ccae18
commit 47e4a1b437
1 changed files with 3 additions and 3 deletions

View File

@ -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