Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me with my HDD interface problem

Status
Not open for further replies.

v1r05

Newbie level 4
Joined
Aug 19, 2007
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
HDD interface problem

hello all

ive got this seagate harddrive i would like to turn to a MP3 player, the project still have a long way to go. anyway the HDD was working fine on the beginning but now every time i try to read a sector it gives and error and when i check the error register the ABRT bit is on !! why is the drive aborting the read sector command ???

other command works fine like spin up/down, read ID

so i tried hooking it up to my PC and the BIOS,windows sees the drive although windows dosent give it a drive letter but its there on th device list. so i downloaded a program called winhex and when i try to read the drive it skips all sectors

what do you think happened to the drive ? is this recoverable ??

thanks for your time.
 

Re: HDD interface problem

Are you trying this way?
1) Write Sector count register = 1
2) Write LBA Address [23:0] = 1
3) Write Device head register = 0xA0
4) Write command register = Read sector command code
5) Read status register and wait until data ready bit is set
6) Loop read data register 256 times to get 1 sector
 

Re: HDD interface problem

this how is suppose to work but after i issue the read sector command i dont get DRQ high but i get ERROR - ABRT.
 

HDD interface problem

Any data bus pin incorrect? a0~a2 ? cs0,1 ?

Or, not supported mode selected. (PIO, MDMA, UDMA)
 

Re: HDD interface problem

watch your loop array

do for loops in c and c++ like this to avoid open buffer at 0

for(x=0;x<=255;)
{

read etc ...
x++;
}

sometimes people over run by using 0-256 this gives 257 data states

so one to check could be this simple

if you find partition table is corrupted
perhaps you overwrite the master boot record
to recover it use A WINDOWS 98 or less boot cd or floppy

to get the tools loaded and c prompt

use fdisk
remove any partitons if you can see it ok if not do this first then reboot
anyway once partitions removed reboot
connect as a master on primary and disconnect other drives

type fdisk /mbr

this will restore the factory master boot record and tables
and youll be able to access again once its repartitioned and formated
 

Re: HDD interface problem

hi all

i did mention its a seagate and their drives got the security features and somehow it is locked now. i got to unlock it and disable the security feature to read sectors off of it

thanks for your help
 

Re: HDD interface problem

look on the makers site for such software

all sounds very strange it chooses to enable its self

i think maybe the master boot record {this usualy lives in the first few sectors}

has been overwritten

a quick email to them if you find no support software is pertainant
 

Re: HDD interface problem

if i tried to access the drive in a unintentional protocol violating way can this cause it lock up ?? (i can post the code if you like)

because i hook the HDD to a pc at first it only detects it but the pc cant read from it after a while it opens up and windows detects it and assign a drive letter to it after that it works perfectly. and everything is intact.

hooking it again to a microcontroller circuit it locks up again and dosent allow reading.

this is really frustrating,i read the ata manual and acted on that but with no luck. anyone knows a good windows/linux/dos application that can switch of the security feature ?

thanks very much
 

HDD interface problem

it seems to be some problem in protocol ;
be sure of connecting data bus in correct pins
 

Re: HDD interface problem

hello everybody

just wanted to let you all know that the harddrive is unlocked and fully functional i used a free application called HDAT2 which is booted from a disk drive (yeah i still have one). it did some magic tricks and that sucker is working like new.

here is the link : https://www.hdat2.com

thanks all for your support
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top