I"m trying to use the uSD slot for datalogging and have run into a couple of issues that I hope someone can help me out with.
I am able to successfully write to an existing file, but the new data does not append the old data. I've looked at several examples and followed the use of the f_lseek function. I've found that I can write over the old data, but the file size doesn't increase, so anything that goes past the last character in the file will be lost. According to the debugger, the size does increase, but when I take out the card and check in on my PC, the new data is not there.
Also, I found that I can create a new file on an old 2GB card, but not on a 4GB card. Can anyone confirm that file creation isn't compatible with the SDHC cards?
And after I create that new file, if I try to write to it, the file reads as corrupted and unreadable on my PC. The f_write function returns with FR_OK in the debugger, so I'm not sure what is causing these issues.
Thank you.