software/liblitesdcard: Only use sdcard_stop_transmission when nblocks > 1 (thanks @bayi).
Similar to what is already done for reads.
This commit is contained in:
parent
c3e93620ec
commit
e55f0da7c7
|
@ -552,7 +552,8 @@ void sdcard_write(uint32_t block, uint32_t count, uint8_t* buf)
|
||||||
sdcard_write_single_block(block);
|
sdcard_write_single_block(block);
|
||||||
|
|
||||||
/* Stop transmission (Only for multiple block writes) */
|
/* Stop transmission (Only for multiple block writes) */
|
||||||
sdcard_stop_transmission();
|
if (nblocks > 1)
|
||||||
|
sdcard_stop_transmission();
|
||||||
|
|
||||||
/* Wait for DMA Reader to complete */
|
/* Wait for DMA Reader to complete */
|
||||||
while ((sdmem2block_dma_done_read() & 0x1) == 0);
|
while ((sdmem2block_dma_done_read() & 0x1) == 0);
|
||||||
|
|
Loading…
Reference in New Issue