Commit dbe9ea8
committed
tinyprog: Pad to full minor sector write size
Either the TinyProg-BootLoader state machines, or the SPI flash chip
used on the TinyFPGA BX, seems unable to *properly* program a partial
minor sector (ie, writing less than 256 octets), leading to a failed
write/verify cycle. This seems to happen at the end of any programming
that is not an exact multiple of 256 octets. Since the whole 256 octets
is already erased in program_sectors(), we pad out the short write to
a full 256 octets (with 0xff, which is the value read for "erased", to
reduce wear on on the flash cells).
For more detail on diagnosing this, see:
timvideos/litex-buildenv#1371 parent 6e31253 commit dbe9ea8
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
502 | 518 | | |
503 | 519 | | |
504 | 520 | | |
| |||
0 commit comments