Reputation: 1711
We are using Chan's FatFS with FreeRTOS and lwIP on a board incorporating Cortex-M4. The board is able to send and receive files over a TCP socket and store them on SD card using FatFS.
I'm trying to test the functionality but seems like it's not operating correctly. When I send and receive the same file, each time the content gets corrupted in a similar manner. The most distinct characteristic of the corruption is that it appends two zero bytes to the beginning of file. This happens all the time while the rest of the corruption may differ (not significantly).
I'm aware that there is not enough information to solve the problem but I'm stuck and looking for some advises for troubleshooting the problem. Chan's code is pretty cryptic and I can not find my way through it.
Upvotes: 1
Views: 1411
Reputation: 11
If you provide the sequence and arguments that you use with fatfs function calls, then that can help me help you. I recently used fatfs for a datalogger application.
Upvotes: 0
Reputation: 1711
For anyone having a similar issue, I've found a workaround. If I limit read-write operations to sector size (512 B), everything works OK. It probably reduces throughput but reliability is our top prio right now.
I'll not accept this since it's not a real solution.
Upvotes: 1