LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-17-2010, 11:46 PM   #1
Niraj Kulkarni
Member
 
Registered: May 2008
Posts: 47

Rep: Reputation: 15
Write to SD card fails


Hi,
I am using Sandisk 2GB micro SD card on ARM processor EP9307A.
The card is detected , mounted.
I can read data from the SD card.
But cannot write to it.
There is no error when I attempt to write to the Card.It appears as if its working fine.But after umount and re-mount , the data written is gone.

Here is the log when the SD card is detected:
# insmod drv
card size = 1977614336, sector size = 31, wp_grp_size = 127, wp_grp_enable = y
S:00001000 M:fffff000

What is the significance of Write Group Protect Enable (wp_grp_enable=y).
Is it the case that the SD card is write protected.

Using CMD9 : SEND_CSD , I can read the Card Specific Data (CSD).

I have tried CMD27 : PROGRAM_CSD , to CLEAR wr_grp_enable : No effect seen.
I have tried CMD29 : CLEAR_WRITE_PROT ,: No effect seen.

Where is the issue,
1. I could not send commands properly.
2. Card cannot be set free from WRITE_PROTECT.
3. Some thing else

Pls help.
Regards Niraj
 
Old 02-18-2010, 01:26 AM   #2
mpier
Member
 
Registered: Jan 2008
Location: Poland
Distribution: Slackware, Arch
Posts: 38

Rep: Reputation: 17
Hi,
there is no protection switch on the card? Did yo try to connect it through sd adapter (sd adapters have this switch).
 
Old 02-18-2010, 02:22 AM   #3
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
What is the significance of Write Group Protect Enable (wp_grp_enable=y).
Is it the case that the SD card is write protected.
It means that group write protection is possible.

Related to:
http://www.freepatentsonline.com/EP1615225.html
... the idea is that the write protection is "permanent" - i.e. you should not be able to just disable it.

From the Sandisk multi-media card manual 1.5.7.6 [pdf]:
Quote:
Two card level write protection options are available: permanent and temporary. Both can be set using the PROGRAM_CSD command (see section 4.2.3). The permanent write protect bit, once set, cannot be cleared. This feature is implemented in the MultiMediaCard controller firmware and not with a physical OTP cell.
Presumably something has been able to write to it. It will be as well to check the HW switch state.

It may be that there is another partition on the drive - the write protection is not supposed to be for the whole card. With in mounted: fdisk -l
 
  


Reply

Tags
fails, sd, write


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Write data stream to SD-Card jcornuz Linux - Embedded & Single-board computer 3 12-16-2009 03:16 AM
CD and DVD write fails SaintDanBert Linux - Hardware 2 11-01-2009 10:52 PM
k3b fails CD write check 100% ! momotaro Linux - Software 5 07-28-2008 10:02 PM
k3b fails to write dvd Fahiem Linux - Software 2 07-28-2004 03:55 AM
Fails to initialize network card sometimes jwstric2 Linux - Networking 8 01-10-2004 11:20 AM


All times are GMT -5. The time now is 01:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration