We are using microSDs as a main memory in our devices (raw mode, SPI interface, STM32 MCU), and in these years we had many problems with them.

We have upgraded our drivers many times, and we added many hardware protections to boards too. until now we have solved many problems but there are some remaining problems too. We know that our microSDs have a poor quality and sometimes they find permanent damage (bad sectors, write protected , ...).

My question is that theoretically is it possible to do permanent damage to microSD by software (low level driver)?

  • \$\begingroup\$ If your software erroneously configures the MISO pin as an output, that could do damage. \$\endgroup\$
    – JimmyB
    Commented Feb 15, 2017 at 13:55

3 Answers 3


Yes, it is possible to render an SD card completely inoperable simply by using it "normally". Low level software always gets in the way whether you want it to or not.

The SDCard itself contains firmware that makes the final decision whether or not to write data to a given location. Your OS level drivers are unlikely to have much influence on the health of the disk. The total amount of data written will ultimately govern the rate of wear to the card.

Do not buy cheap consumer grade SDCards, you should consider buying the more expensive industrial grade cards and go with ones rated for a wider operating temperature range.

My company did a destructive test of the high end industrial cards and it took a full 3 weeks of constant overwriting to see the first write error, that was after about 18 terabytes had been written.

The cheaper cards gave up completely after only a couple of days - that is to say that it became impossible to write anything at all to the card. The OS itself refused to understand the geometry meaning that it was not possible to recover the card back to normal usage - the card was worn out to the point of uselessness.

We concluded that SDcards are a pretty crummy storage medium but for low-rate usage, although they will probably be fine as long as you are willing to over-spec them to provide maybe four times more storage than your project really needs.


There are some ways to brick your sd memory cards with software only:

  1. Use a proprietary 'interface' commands that can enable encryption or lock something other.
  2. Request switch to 1.8V SDIO, while still having 3.3V on the MCU (not sure what could happen here and how wide damages could be)
  3. Using wrong cluster allocation units (formatting with windows tool instead of dedicated one), or writing to the card in single 512 byte sectors instead of larger blocks (forcing to erase single 32k "flash sectors" 64 times), will reduce card life significantly. http://elm-chan.org/fsw/ff/en/appnote.html#fs2
  4. In case of using consumer grade SD cards. There is a lottery in behaviour after wearing out the flash. Some cards may go into read-only mode, some will allow to overwrite badblocks and some will just brick itself. Even more, there is a chance that SD card will brick itself "just because" without any attempt in wearing it out.

You could continuously write to the SD card to its death since they have a limited number of write-cycles.

Although, if you're not deliberately trying to kill the card, or constantly writing huge amounts of data, it's unlikely you'll ever hit that limit with normal use.

  • 1
    \$\begingroup\$ Thanks, but that's not our problem. \$\endgroup\$
    – electro
    Commented Oct 9, 2016 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.