Bad Logging eating SD cards

Not the first time I’ve encountered the bad logging issue but encountered it again this week. Sometimes the bad logging appears in flight and sometimes it prevents the aircraft from arming all together. The last time I had this issue swapping the SD card was a quick and easy fix. This time around I discovered there can be a little more involved in getting the aircraft back up and running.

All SD cards I have used are formatted as FAT32
First SD card that failed was an 8gb San Disk Edge, I replaced it with another 8gb San Disk that was used in a 3D printer without doing any special formatting an it has yet to fail in my quadcopter.

The second failed SD card was also a 8gb San Disk Edge, initial swapping to another SD card did not fix the issue on my Hexacopter(3.6.9).

What did work was buying new SD card, a San Disk Ultra Plus 16gb card, and formatting it to FAT 32 with some free software.
The formatter I used was from https://fat32-format.en.softonic.com/
It seems to work well and the new SD card has yet to give any errors on the ground or during flight.

I plan on also testing another PNY Elite 16gb card to see if I can find any patterns as to why my cards keep failing and what the best options are.

Ill update this post with whatever I find.

The “logging failed” error will appear in any case where a new log can’t be created, so it could be caused by any number of reasons. On your failed SD cards, have you tried just deleting all the contents on the SD card and trying again? This will eliminate any causes that have to do with the file organization.

By the way, you shouldn’t need any third party software to format drives. Your OS will have a built-in feature to format them for you.

Yes, I have tried deleting all contents from the SD cards, it actually seems like I have issues more often when I do that which is why I thought to move to a 3rd party formatter. Not sure if that is really necessary but I thought I’d give it a try.

What flight controller are you using and what settings to you have for LOG_* and INS_LOG_* parameters?

Flight controller is a pixhawk 2.1

params:

Another thing I’m noticing with the “bad” SD card is it seems to start doing some weird time stamps on the logs. After doing some reading it sounds like these time stamps are the default when GPS isn’t available however, for the last flight that was logged to the SD card there was reliable GPS connection.

Second date anomaly comes from the SD card itself. When looking at the SD card plugged directly into my laptop the date modified shows up as 1999. The good SD cards I have that have not had any logging issues show nothing under the date modified for the APM folder.

Not really sure if this is relevant to the issues I’m having I’m just sharing everything that I’m seeing out of the ordinary.