We have our custom BF547M-based board and we are trying to run example mass storage device for bf548.
We have the sd card on our device and we try to read/write data through usb.
Read data from sd is successful, but if try to write data then the Windows application is hang.
When I reloaded the project, on sd card I saw the file which I tried to write.
But file was with error.
Only the first 4 Kbytes written correctly.
If I want to write file not more than 4 Kbytes, when write is succesful without problem.
But if more than 4 Kbytes, then only first 4 Kbytes write correctly.
I found in the file "mass_storage_app" #define USB_BUFF_SIZE 4096.
If to change this define, then exactly as many bytes written correctly.
If to use ram disk then have no problem read/write.
What is the problem ???