You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed slow SD card writes when using the SDHC library. Probing the data lines with an oscilloscope revealed that only the DATA0, CLK, and CMD lines were active. The DAT1 .. DAT3 lines were permanently high during data writes.
Browsing through the code and using the debugger, I found that the data width is hardcoded with the enumeration MXC_SDHC_LIB_SINGLE_DATA in diskio.c. The relevant line for the write function is shown below. The matching read function has the same hardcoded enum. I am using FF15.
if (MXC_SDHC_Lib_Write(sector, (void*)buff, count, MXC_SDHC_LIB_SINGLE_DATA) !=E_NO_ERROR) {
After manually changing the hardcoded enums to MXC_SDHC_LIB_QUAD_DATA in diskio.c, I do see all 4 data lines wiggling, and the SD card write speeds increase as expected.
Is there a reason for the SDHC to be hardcoded to 1-bit mode when using FatFS/can the ability to use all 4 data lines be added to the MSDK?
Thanks!
The text was updated successfully, but these errors were encountered:
What chip are you using? I do not know the full history, but not all of our chips support QSPI operation, for ease it was most likely set to that to not have to deal part to part variation. I will add this to my list and will update this sometime soon.
Hi there,
I noticed slow SD card writes when using the SDHC library. Probing the data lines with an oscilloscope revealed that only the
DATA0
,CLK
, andCMD
lines were active. TheDAT1
..DAT3
lines were permanently high during data writes.Browsing through the code and using the debugger, I found that the data width is hardcoded with the enumeration
MXC_SDHC_LIB_SINGLE_DATA
in diskio.c. The relevant line for the write function is shown below. The matching read function has the same hardcoded enum. I am using FF15.msdk/Libraries/SDHC/ff15/source/diskio.c
Line 199 in 5955fcf
After manually changing the hardcoded enums to
MXC_SDHC_LIB_QUAD_DATA
in diskio.c, I do see all 4 data lines wiggling, and the SD card write speeds increase as expected.Is there a reason for the SDHC to be hardcoded to 1-bit mode when using FatFS/can the ability to use all 4 data lines be added to the MSDK?
Thanks!
The text was updated successfully, but these errors were encountered: