I am trying to implement the FatFs code to read and write a text file on an AM3359 Arm cortex A8 board but files are not written properly to the SD card. The SD card will mount and initialize, I can read text from files and delete files. When I create a file, the fill will show up on the SD card and will be the appropriate size, but will be unreadable on both the am3359 board and windows. Windows says the files are corrupted and will not open them. After fixing the files, Windows pops up a notification that there is something wrong with the disk and to scan it. The following message reads “the first allocation unit is not valid. The entry will be truncated”. If I create a text file on windows and simply open it and overwrite it then everything is fine. Has anyone else had any issues with implementing FatFs on this board?
I can provide any additional information needed.
Thank you