1)Can you please attach the complete project.
2)Did you check if the complete data is read from the camera over UART
3)Have you tested the same project with another SD card.
How are you moving data from UART Rx buffer to buffrec?
I suggest you to use DMA for this so that you will get more CPU time for writing into the SD card.
In fact, I listen the UART camera, and the transmission is OK.
I attach 2 files, the .jpg is the file that is saved on the microSD, and the .txt is all the strings that camera sends. I open and compare the files with a hex viewer (xvi32).
I've used another SD card but the problem is the same.
Sorry, is the first time that I work with a SD card, and I don't know how use the DMA, inclusively I tried to use functions as "FS_MMC_HW_X_Write" but it doesn't work.