Closed jburks closed 6 months ago
I already noticed some problems on the real hardware with the SPI auto-tx. So the SD card access code now uses the slow path without auto-tx, but that will give reduced speed.
It is believed that this can now be closed. The final issue was that the flag in fat32/regs.inc was $08
instead of $04
. Read throughput is about 50% faster with auto tx enabled on the X16 at 8MHz (206995 bytes/sec vs. 133293 bytes/sec).
In this code in top.v:
It looks like the SPI auto tx will only start if
access_addr
is5'h1E
while thedo_read
strobe is active. Theaccess_addr
signal is updated with the contents ofrdaddr_r
which in turn is updated on the falling edge ofbus_read
. Sincedo_read
is only active for 40ns andbus_read
is active for 62ns, it appears that there may be a 22ns window of opportunity for the start condition to be missed.