Electronic – How does SD card write protect switch work

microchipsdusb

I am designing a device which requires an SD card for logging data, and I am using Microchip USB2240 as USB to SD bridge. I have all the parts on board (Referenced by Microchip).

I am able to log data to SD card as well as read data on my computer, but I have just realized that I cannot format the SD card nor delete any files from it.

I have a thought that this might be the problem with SD card WP switch, as I am using Micro SD card which doesn't have WP switch and USB2240 Evaluation board comes with the MMC socket. MMC has a WP switch (but the connections are true).

What will happen inside MMC when I move the switch to the lock position?

On the other hand, USB2240 has a SD_WP switch, which in my case is floating. They have not provided any information on this pin in the datasheet; whether I have to pull it HIGH or LOW to remove Write Protect.

Could the problem be either the write protect switch or SD_WP pin?

All the documentation on USB2240 bridge can be found here : LINK

Best Answer

The Write Protect on the SD card standard is essentially a Honor System. The card reader host must choose to honor it. That's it.

As for your SD WP pin. If it is floating with no internal pull up or down, then you have a problem. The line needs to be pulled up to VCC or down to ground. Floating will cause you problems if your IC honors the write protection.