Locked micro SD Card? - RAW Shooting and Processing - CHDK Forum

Locked micro SD Card?

  • 4 Replies
  • 6023 Views
*

Offline KenO

  • ***
  • 122
Locked micro SD Card?
« on: 17 / September / 2015, 18:12:05 »
Advertisements
Hi,

Have recently been buying micro SD Cards so I can use the same card with  my Canon Camera and Samsung Note 3.

Recently I decided to reformat a Samsung 16GB mSD card that I had last added MP3 audio files.

Normally I use my Canon Camera to reformat both mSD and SD cards.

Was surprised when placed it in a SD adapter and loaded in camera and it said "locked SD card"

At first thought it was a bad adapter but tried another mSD card and the adapter was OK.

Then tried to reformat the 16GB mSD card using the Note 3. While it went through the reformat steps OK (no error messages) when checked after it was done all the original files were still there.

Googled and found Question: "...is there any setting in the card itself that locks it" Answer:"there are several SD commands which can be used to do this. In particular, CMD27 (PROGRAM_CSD) can be used to set bits which control temporary or even permanent write protection, and CMD42 (LOCK_UNLOCK) can even be used to turn on and off password-based read protection." http://superuser.com/questions/785103/a ... s-lockable

Did a forum search but found nothing.

Hope that someone may know of a FAT 32 App that can unlock a micro SD card.

Am also wondering how the micro SD card became locked?

Appreciate any comments!

Thanks

Ken

*

Offline reyalp

  • ******
  • 14080
Re: Locked micro SD Card?
« Reply #1 on: 17 / September / 2015, 21:51:51 »
The only lock CHDK knows anything about is the little movable piece of plastic on the a full size SD card or adapter. This is purely mechanical item that engages a switch in the camera. The camera software uses the switch to decide if the card is locked or not (and CHDK masks the switch, so files can be saved even if the card is locked)

Many adapters have a lock tab. Make sure yours isn't locked.

We have also seen cases where the switch inside the camera becomes stuck. In this case, you may be able to free it by poking it with a toothpick or similar.

While I don't know much about low level SD commands, I would be very, very surprised if your card was "locked" with some kind of software command.
Don't forget what the H stands for.

Re: Locked micro SD Card?
« Reply #2 on: 17 / September / 2015, 22:04:05 »
I started trying to read through this :  SD Specifications Part 1 Physical Layer Simplified Specification  but gave up when I concluded that none of the commands you reference in you original post about CMD27 (PROGRAM_CSD) or CMD42 (LOCK_UNLOCK) are ever used in a normal PC computer / camera SD card environment. 

So I guess the question is whether you have one borked micro SD card (bummer) or if this is  generic problem?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline KenO

  • ***
  • 122
Re: Locked micro SD Card?
« Reply #3 on: 18 / September / 2015, 11:42:12 »
Hi reyalp & waterwingz

Since posting have been doing some searches and with a tip that the lock could be due to CMD42 found
"SD card lock and unlock"
Some comments I thought were helpful "...According to SD card specification CMD42 is an optional optional and may not be implemented by all manufacturers...The CMD42 is optional in Version 1.01 and 1.10 and mandatory from Version 2.00...I use only Sandisk cards (I use microSD which belongs to Version 2.00  and higer) but that seems not to work. Also I can't find any software for WinXP to do a software lock based on password for those SD cards, just to make sure that it works. It's realy strange that there is almost no information about it except in the Sandisk documentation (which is very limited to text only)...Ther are some informations to the SD-card commands on http://www.sdcard.org/about/memory_card/pls/ see 4.3.7 Card Lock/Unlock Operation...I tested the lock/unlock function ,and it worked...I use the MOTO E6 to lock my card, and use STM32F103VBT6 to unlock, then use STM32 to lock and E6 to unlock, both works well. I use the SPI mode..."  https://embdev.net/topic/109942 

This was Posted on: 2008-09-02 and last significant post 2009-02-27. Hope there is more recent information!

I have no idea how the lock occurred but that it was on a cell phone (used with 4 phones) since this was where mSD card was last used.

Would like to be able to lock SD cards so accidental erasure does not occur.

Ken






*

Offline reyalp

  • ******
  • 14080
Re: Locked micro SD Card?
« Reply #4 on: 18 / September / 2015, 15:47:59 »
Once again, I would be very surprised if your card was locked by some obscure software command.

As far as I know, the camera's "Card Locked" message is only connected to the switch that detects the plastic lock tab on the SD card. Although it's possible the Canon firmware could show it in other case, I don't see any reason they would.

Have you tried the card anywhere other than the camera, like a card reader in a PC or a phone?
Don't forget what the H stands for.

 

Related Topics