Pages: [1]   Go Down
Author Topic: Corrupt TXT File Troubleshooting  (Read 1097 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone. After experimenting with my Arduino board I programmed an FPGA to write data to a SD card. When I write a text file to the card and then over write the txt file I am able to open the text file with no problems. When I format the card and write a new txt file to the card windows give me an error message saying the file is corrupt. In both cases the card is receving the same data from the host so I am at a bit of a loss as to why one works and one does not.

What is the best way to determine why windows thinks the file is corrupt? I have used win hex to look at the bytes on the card and the file that windows can open and the file that windows says is corrupt look the same to me.

Thanks
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no easy way to know what Windows has found.  I have programs that help find problems with file systems but these programs are tools, not somthing others could use.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the response and that's too bad. I have seen that there are some utilities that can repair corrupted files. Do you have any recommendations for which ones work well?
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can't help with a repair program.  I don't trust them.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 651
Posts: 50845
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is the best way to determine why windows thinks the file is corrupt? I have used win hex to look at the bytes on the card and the file that windows can open and the file that windows says is corrupt look the same to me.
The best way is for you to show use (particularly fat16lib) the code that you are using to write the file on the SD card, so we can help you stop creating corrupt files.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the offer, but as I said in the post I am programming an FPGA and my logic is instantiated using Verilog. I am not sure if posting Verilog code would be tolerated on this forum.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 651
Posts: 50845
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am programming an FPGA and my logic is instantiated using Verilog. I am not sure if posting Verilog code would be tolerated on this forum.
Probably not. If you are not having an problem with Arduino or an Arduino library, why are you even here?
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 227
Posts: 14014
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


@Hooligan,

but there is a reason why you came to this forum. Can you explain why you asked it here iso some verilog forum?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: