08-02-2019 06:51 PM
So I accidentally forgot to close the sd card file before deleting it or something like that . And because of this, my SD card is now unrecognizable by any SD module and computer. When I put my micro sd card in the computer(windows 10), nothing appears, instead, my disk management keeps loading forever.
When I try different micro sd cards with the Arduino, they work fine, so the wiring is all correct; my bricked micro SD card is the problem.
I tried to troubleshoot and formatted via the author's SD library. This code. The Arduino formatter says,
Card Size: 1978 MB, (MB = 1,000,000 bytes) Erasing error: erase failed SD error: 63,0
I got some information about the sd card. I get this error code from SDinfo without removing or doing anything to the sd card:
error: cardBegin failed SD errorCode: 0X20,0XFF
And strangely, I also get this error from SDinfo when I insert the SD card right away.
Card type: SD2 Manufacturer ID: 0X3 OEM ID: SD Product: SU02G Version: 8.0 Serial number: 0X469EC17 Manufacturing date: 4/2012 cardSize: 1977.61 MB (MB = 1,000,000 bytes) flashEraseSize: 32 blocks eraseSingleBlock: true OCR: 0X80FF8000 SD Partition Table part,boot,type,start,length 1,0X0,0X0,0,0 2,0X0,0X0,0,0 3,0X0,0X0,0,0 4,0X0,0X0,0,0 error: File System initialization failed. SD errorCode: 0X30,0XFF
So the SD card is ALIVE, but it's in a coma. XD How do I get it out of its misery if it doesn't let me format it or even access its data?
Edit: Shoutout to u/NotTheory, u/be-happier, u/triffid_hunter, u/anotherdonald, and u/ThatHardcoreKid16 for their help. I figured out the problem! Unfortunatley, the SD card is bricked, but I know why and how we can avoid it the next time. It turns out the problem was a lack of a good reliable power supply for the sd card module. I was using the Arduino Pro Micro, and it turned out it wasn't able to output enough current to the SD card. Through more testing(with a new SD card), I found out it was definitely the Pro Micro's voltage regulator; when I try to format a file via Arduino, the Pro Micro struggles to regain access to the SD card after formatting.
Long Story short, just get a good voltage regulator when using SD cards. At least it was just a 2GB micro SD card. 🌺RIP🌺
09-03-2019 11:31 AM
not sure how disk utility works, but i think it might have something to do with not being a super user. my first suggestion would be to type su and then at the prompt the root password, then gparted. it's a GUI so shouldn't be too bad to figure out. if you don't have a utility. type apt install gparted, or whatever else you want. otherwise, for CLI, go in console, type su, then the root password. then fdisk -l to find what device it is. say it is /dev/sdc. if it has a mount point, you'll probably want to umount it. now you'll fdisk /dev/sdc. you'll get some options, try p to see if it even has a partition table. if it's **bleep**ed, try o for a new dos partition table. d should let you delete partitions, and n to make a new one. you'll probably just want one partition that is the size of the whole thing. after that, w to write and save. if all of that worked, you'll want to use mkfs to make the partition fat32, probably. i think these things should work, if not you can also mess around with searching the web for these commands
09-04-2019 11:21 AM