My project worked perfect over a month and when I took that SD card for edits and put it back, it begins to reset when a txt file starts reading from that. When I format the card with LinuxMint it was ok, but now it still resets. If I put a new SD card it works perfect, but after editing in PC, it fails.
I've read about SD Formatter 4, but even that doesn't help me.
Which format option should I choose in SD format 4?, how can I solve this problem?
Your problem is not likely the card format.
There are no options in SD formatter 4 since there is only one correct layout for a given SD card. For best performance the file structures must be aligned with the internal flash structure of the card. Mint Linux won't do that but the card should still work, maybe a little slower for some writes.
It is most likely lack of free RAM. More RAM may be required after the card is used since allocation of clusters is more complex. If you run out of RAM something will be over written and a reset will happen.
The other possibility is your program writes over something in the SD library because of a bug. Not as likely as running out of RAM though.
But if I put the same files in a new(unused) sd card works perfect. And only read operation is carried out. So no chance for memory overflow.
What about changing code with sdFat lib? What is the difference actually?
Which format option should I choose? Full or quick....
But if I put the same files in a new(unused) sd card works perfect. And only read operation is carried out. So no chance for memory overflow.
The SD library will not execute the same way after a card is used. the directory and FAT become fragmented.
What is the the number of bytes left for local variables in this message?
Sketch uses 16,378 bytes (50%) of program storage space. Maximum is 32,256 bytes.
Global variables use 1,423 bytes (69%) of dynamic memory, leaving 625 bytes for local variables. Maximum is 2,048 bytes.
You need at least 350 bytes free for the SD library after allowing for any local variables in your program.
It won't matter if you choose the full or quick option.
Sketch uses 18,045 (55%) of program memory, global variables uses 1,453 (70%) leaving 595bytes.
Is that ok?
May I need to change to sdfat lib?, what may be the problem?
Changing to SdFat won't help the RAM problem. SD.h is based on a seven year old version of SdFat and both use about the same amount of RAM, mainly the 512 byte SD block cache.
If you use any large String type variables or large local arrays you will likely crash.