-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FatFS using SDHC is hardcoded to 1-bit mode in diskio.c #1044
Comments
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. |
We are using MAX32666. The current code is on a FTHR board, but we will eventually move it to a custom PCB. Thanks! |
Thanks @JordanAceto, this is just a legacy hard-coded config. We can and should expose this as a config option to the API. |
Ah looks like @EricB-ADI is already on it in #1045 |
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: