software/liblitedram/write_level_scan: reset write delay even if not succeeding.

This commit is contained in:
Florent Kermarrec 2020-09-07 18:53:31 +02:00
parent 658f712001
commit b39fea4ecb
1 changed files with 4 additions and 1 deletions

View File

@ -333,12 +333,15 @@ static int write_level_scan(int *delays, int loops, int show)
}
}
}
/* rst delay */
write_delay_rst(i);
/* succeed only if the start of a 1s window has been found */
if (one_window_best_count > 0 && one_window_best_start > 0) {
delays[i] = one_window_best_start;
/* configure write delay */
write_delay_rst(i);
for(j=0; j<delays[i]; j++)
write_delay_inc(i);
}