2014-11-11 02:34 AM
Hi,
I'm testing FatFS with STMF4Discovery board and I have issue when I write some bytes sequnce. Generally FatFS works well, reading, writing, format, but when I try to write data sequence: '0xAEAE' I get the wrong value: '0xD0BED0BE' on a SD card.I have made many similar experiments this days with different values and I have the issue with '0xEEEE' value too, when I'm getting the same problematic value: '0xD0BED0BE' .For other bytes combination of '0xFEFE' , '0xFFFF' or '0xBEBE' everything works well.Also I have try to write data byte by byte, and also I put f_sync function between two problematic calls of f_write and issues still persist. Just for clarification, my connection with SDcard is over SDIO interface in DMA mode. Form hardware side, I use http://www.element14.com/community/community/designcenter/stm32f4-discovery-expansion-boards for SDcard connection.Also I have checked power supply, and I have changed many SD cards (2GB, 4GB,8GB) formatted either in FAT16 or FAT32 from windows or from FatFS driver.If you have some suggestion, please let me know.Thanks #discovery #sdio #stm32f4 #fatfs2014-11-12 07:39 AM
Hi,
Which FatFs version are you working with ?Can you provide me the hole f_write() and f_read() functions' calls ?You're checking the written data by f_read() call or by just exploring the uSD card via Windows ?Regards,Heisenberg.2014-11-13 01:02 AM
Hi Heisenberg,
Thank you for suggestions. Read goes well, and finally I found that the bug was in my hex editor.Hex view plug-in for notepad++ have bugs when displays this sequences. Best regards,Vukasin2014-11-13 02:51 AM
Hi Vukasin,
Ah ok ! Good news.Cheers,Heisenberg.