Hard disk IDE interface problem

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I've built only 2 MCU systems that have an IDE hard disk,
but they both worked fine. My third one is giving me some troubles.

After reset, I read
0x1 from addrs 1-3, and
0x0 from addrs 4-6,
which, I believe, are the correct reset values.

But when I do a second-loop read, all regs show 0xFF.

Status reg (reg 7) always shows 0x0.
That alone should indicate that the device 1 is not present,
and device 0 responds in the place of device 1.
But that happens no mather what value I write in
reg 6, bit 4 (DRV bit).

I've checked with the scope DIOR, DIOW, DA2-DA0, CS0 and data bus,
and I don't see a reason the hole thing fails.
My writes DO reach hard disk, and my reads really show reading
0x0 from the disk.

Why is it sending me 0x0 instead of 0x50 in the status reg?



Re: Hard disk IDE interface problem
Also, even though I've checked the lines with the scope and
everything seems fine, a write to reg 2 with 0x55 reads back 0xFF.

Also, I've issued the Sleep command several times, and it worked
only one time. Again, I'm pretty sure the I/O lines are fine.

So I'm clueless now.


Quoted text here. Click to load it



Re: Hard disk IDE interface problem
Quoted text here. Click to load it

Oh welcome to the club. A bad decision I took 10+ years ago to
choose the wrong connector (was the only small enough option
back then) has cost me countless hours and probably has shortened
my life with many years while chasing which pin of the cable does
not work this time (which gets active no earlier than closing the
case, of course).
Sounds much like a cable problem. With ATA they come in many
varieties, even without my poorly chosen connector (which works
OK once made to work, it just costs *a lot* to get there).

If you have the option to just test with another cable you
probably want to do that. If you beep the cable and it sounds
OK don't get too happy, it may still stop working after you
bend it in the test setup (most of them have single wires inside).

I know how this sounds but I have had way too many of these
cables and at the moment I am back there replacing a DVD-writer,
that cable cost me a few hours already... I am not always that
furious, you know :-).

Dimiter

------------------------------------------------------
Dimiter Popoff               Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------
http://www.flickr.com/photos/didi_tgi/sets/72157600228621276 /

Re: Hard disk IDE interface problem

Quoted text here. Click to load it

I just went through my own life-shortening connector experience.
Bringing up the hardware in a new design, with an HDMI connector were
one pin was not soldered, but was lying above the PC pad just so that
the pressure from touching it with a scope probe will make a valid
contact. Signal looks OK, but it is not getting through, signal looks
OK, but it is not...
These things are sneaky ...
--
Roberto Waltman

[ Please reply to the group,
We've slightly trimmed the long signature. Click to see the full one.
Re: Hard disk IDE interface problem

Quoted text here. Click to load it

Actually, that would be normal, since issuing the
Sleep command requires a RESET.

But, I am actually using the Stand-by command.

I don't think it is the cable - I've tried the same
hard drive and the same cable on my PC and it works.
I have even changed the cable, just to be quite sure...

Is there a specific forum about this kind of stuff?



Re: Hard disk IDE interface problem
It looks like DIOW gets triggered by DIOR,
for reasons not yet known. My scope doesn't see
that, but the problem disappears when I place
a cap on DIOW line.



Re: Hard disk IDE interface problem
Quoted text here. Click to load it

It can be because of asymmetrical drive capability on the your driver
chip. It is also possible that the rise/fall times of the drivers are
too fast causing capacitively coupled transients. Series resistors
could also reduce/fix the problem.

Re: Hard disk IDE interface problem
Quoted text here. Click to load it

The driver on my side is GAL16V8.
Hard drive has series resistors on its PCB - and none of my
previous versions had them on my PCB.

I can now read the disk only to see that I read
only the high byte... maybe I was drunk ;)

Re: Hard disk IDE interface problem
Quoted text here. Click to load it

The ATA cable is a complete mess. Unterminated signals etc.
You can try some series resistor (10 Ohm or so) at your
driver outputs, not only on DIOW/DIOR but also on DACK.
How many wires are there in that cable? If it is not
one of the 80-wire ones (on a 40 pin connector, 40 are
just GND) it will be easy, just get an 80 wire cable.
If the 80 wire cable won't work, hmm, look for glitches
on the GAL output, most likely the fault is in its logic
(or in what it gets as input). But the way you describe
it with the cap etc. it sounds just like capacitive
coupling between the lines of a plain ribbon cable,
a standard UDMA capable ATA cable should not have this
problem.

Dimiter

------------------------------------------------------
Dimiter Popoff               Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------
http://www.flickr.com/photos/didi_tgi/sets/72157600228621276 /

Re: Hard disk IDE interface problem
Quoted text here. Click to load it

It is a 40-wires cable. But the pinouts on the IDE cable
were carefully chosen so that DIOR/DIOW *do* have GND around.
(by whoever designed the IDE conn)

Re: Hard disk IDE interface problem
Quoted text here. Click to load it

Indeed. But if you had had *that* floating it would have been
even more nightmarish :-). You may still have it actually, this
would explain the strong capacitive coupling between IOW and IOR.

Dimiter

Re: Hard disk IDE interface problem
I have the DMACK floating.. (shame)
Will change that. (to VCC)

Site Timeline