2026-02-10 11:17 PM
Hello,
I'm using uSD.
I observe that in the sd_diskio.c driver SD_TIMEOUT is 30sec, is'nt very long ?
If uSD works normally is not sufficient just 1sec ?
Best regards.
2026-02-11 3:16 AM
Hello @MauFanGilaMedical
Some SD cards can be significantly slower than typical cards, particularly at low bus clock speeds. In these cases, certain operations such as internal erase or program (for example erasing blocks or writing to specific internal areas) may take several hundred milliseconds and can even exceed 1 second in worst‑case conditions. For this reason, the default SD_TIMEOUT value in the ST reference driver is set quite long. It is designed to avoid false timeout errors. In a final product, this value can be reduced based on the actual SD cards used and the system constraints.