Forums

Compact Flash busy bit constantly set

Started by SweetCraspy December 15, 2011
I have a Compact Flash card that was used in a custom long-term datalogger
that ran to battery depletion.  After recovery, the card is not recognized
by the disk management tools in Windows XP, Mac OSX or Ubuntu Linux.  It
should have data on it, and I would like to recover that data if possible. 


It is certain that the logger went through a marginal power state as the
batteries failed, and may have browned out in the middle of a write.

I've played with the card in a test environment, and am able to read and
write at least the HEAD, SECTOR_NUMBER and CYLINDER_LOW registers.  I can
also read the STATUS Register.  The STATUS Register read always returns
0x80, which is the BUSY bit.  I am using the ATA/ATAPI-5 standard for these
operations.

Is there any way I can reset the card without destroying the data, access
the data with a different protocol, or otherwise save the CF card?

Thanks!	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
This is a repost of the above message with more explicit formatting.

---

I have a Compact Flash card that was used in a custom long-term datalogger
that ran to battery depletion.  After recovery, the card is not recognized
by the disk management tools in Windows XP, Mac OSX or Ubuntu Linux.  It
should have data on it, and I would like to recover that data if possible.


It is certain that the logger went through a marginal power state as the
batteries failed, and may have browned out in the middle of a write.

I've played with the card in a test environment, and am able to read and
write at least the HEAD, SECTOR_NUMBER and CYLINDER_LOW registers.  I can
also read the STATUS Register.  The STATUS Register read always returns
0x80, which is the BUSY bit.  I am using the ATA/ATAPI-5 standard for
these
operations.

Is there any way I can reset the card without destroying the data, access
the data with a different protocol, or otherwise save the CF card?

Thanks!	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com

SweetCraspy wrote:

> I have a Compact Flash card that was used in a custom long-term datalogger > that ran to battery depletion. After recovery, the card is not recognized > by the disk management tools in Windows XP, Mac OSX or Ubuntu Linux. It > should have data on it, and I would like to recover that data if possible. > > It is certain that the logger went through a marginal power state as the > batteries failed, and may have browned out in the middle of a write. > > I've played with the card in a test environment, and am able to read and > write at least the HEAD, SECTOR_NUMBER and CYLINDER_LOW registers. I can > also read the STATUS Register. The STATUS Register read always returns > 0x80, which is the BUSY bit. I am using the ATA/ATAPI-5 standard for these > operations. > > Is there any way I can reset the card without destroying the data, access > the data with a different protocol, or otherwise save the CF card?
It is not possible to do any operation while the card is in BUSY state. Try forcing the hardware reset, and then doing all operations in the slowest PIO mode (PIO-0). If the card doesn't come up into READY state after few hundred milliseconds after reset, then the card is broken. If your data is really worth it, you can unassemble the broken card and read raw information directly from NAND chips. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
>It is not possible to do any operation while the card is in BUSY state. >Try forcing the hardware reset, and then doing all operations in the >slowest PIO mode (PIO-0). If the card doesn't come up into READY state >after few hundred milliseconds after reset, then the card is broken. > >If your data is really worth it, you can unassemble the broken card and >read raw information directly from NAND chips. > > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com
Thank you for the suggestions! I will see what I can do. --------------------------------------- Posted through http://www.EmbeddedRelated.com