I have downloaded the latest version of the fatfs fsample zip file.
I have added code to use the SPI peripheral, and also make sure the mmc is powered.
Disk initialization goes ok,
Mounting of the volume is working
I can read the directory contents and even open a file and spit its contents to the terminal.
So that does indicate that all communication is working
The problem I now have is that I can not write to the mmc card all write commands seem to be crashing, as in the sample system seems to be just stopping to execute code.
when I do a "fo 6 mtst.txt" being open a file with FA_WRITE and FA_CREATE_NEW (file name does not exist when doing a directory read with the fl command) I do get a FR_OK so that indicates that the file has been created.
after this it no longer matters what I do.
I tried a "fw 1 48" so just writing the H to the file ( a fw 1 h does not work is aborted and the cursor returns to the next line with the ready indicator '>' )
I also tried a "fc" to immediately close the file again, effectively creating an empty file, that gives the same result.
the cursor goes to the next line to confirm that it has got the line entered, but the ready indicator never returns.
Also I am not able to put in new commands, like a fl or fo
I use a 2Gb mmc card have tried a number of things and I am not in read only mode FF_FS_READONLY = 0
Note that I started with the sample code that was added at the end of the FatFs tutorial and that behaves the same on my board so that was why I went back to the fullblown sample code to see what I could do with the result that I can read but not write to the mmc
I hope someone can give a clue on what might be happening.