2019-09-30 10:09 PM
I have NUCLEO-F767ZI 216Mhz and a SD card breakout board. I am using cube mx 5.2.0 and FW_F7_V1.15.0 for code generation. I want to read/write in a file on a sd card. I have enabled SDMMC1 (SD 4 bit wide bus) in cube mx and also enabled FATFS middleware for sd card.
SDIO CLK divide factor 3
MAX_SS 4096
and all other parameters are default
I have connected SDIO pin correctly (double checked) .
When I use 1 bit SDIO bus it works perfectly for same code.
Code:
FATFS SDFatFS ;
FIL SDFile ;
res =f_mount ( &SDFatFS , SDPath,1);
char myFileName[]= "abc.txt"; // create new file
if (res == FR_OK){
res=f_open ( &SDFile , myFileName, FA_WRITE | FA_CREATE_ALWAYS); // open in write mode
}
char myData[] = "xyx,ghj,acceleration,target position\n 1000,231.25,10,500.5";
if (res == FR_OK){
res=f_write ( &SDFile, myData , sizeof(myData), &myBytes);
}
f_close(&SDFile);
2019-09-30 10:23 PM
Likely unrelated to code shown.
Could be SW, could be how you have your card wired.
4-bit test code for NUCLEO-F7xx posted here, review output to VCP
https://community.st.com/s/question/0D50X0000BOtWr8SQF/fatfs-sdio-4-bit-mode-stm32f746zg-nucleo
2019-09-30 10:32 PM
I have wired the card correctly. I saw your link and downloaded your demo. I don't know what to do with your hex file
2019-09-30 11:37 PM
Program with STM32 Cube Programmer, observe via Terminal app.
2019-10-01 12:21 AM
I tried. It is just Printing 0,13 % every second
2019-10-31 04:10 AM
Solved! It was't related to software.
2024-08-20 12:14 AM
May I know how did you resolve it in your case?
I had the same problem.