ATA Protocol

Hi All,

This is my first post in this forum.

If anybody has worked on ATA-3 protocol for hard diks drives,then g ahead with description:

Currently i am working on ATA protocol[PIO mode] for hard drives. I am facing a problem while executing Identify device command.I a performing the flow as per flow mentioned in ATA datasheet as follows:

1) reading status register and checking for BSY bit. I am getting it lo whenever hard disk is not busy. So that is fine 2)Now selecting device by setting dev bit low. I am setting it low becaus it's status should match with the cable_Select pin. In my hardware cabl select is connected to ground. So i am writing A0h in device/hea register. 3)Reading the status register and checking for BSY and DRDY bits. I a getting BSY = 0 and DRDY = 1. So it is ok. 4)Writing command ECh in command register.[Identify Device = ECh]. 5) Checking for Error bit in status register and BSY bit also. I a getting BSY low and ERR bit low. That means no error has occured till now. 6) no I am checking for DRQ bit. But i am not getting DRQ = 1 as per th flow mentioned in ATA-3 Datasheet. Even if I ignore DRQ bit, and start reading data register, i always ge FF00, which is not as per outputs mentioned in datasheet for Identif device command. I am getting all 256 words as FF00h only.

So i am facing this problem for last seven days and i am not getting an proper documents on internet to sort out this issue.If any body can suppor me in sorting out this issue,please support me for this.

Thanks and Regards. Ravi

Reply to
Loading thread data ...

Is there anything on larwe's page?

formatting link


Reply to
Martin Griffith

Reply to

Apparently you have found and ATA-3 (although the earliest I would use is ATA-4) and you seem to have tried a lot so the issue is subtle. I was through this 7-8 years ago - and though it feels as if it had been yesterday my memories are vague.

You may have an issue if your processor (and its interface to the ATA bus) is too fast, there are requirements to guarantee some time prior to checking some of the bits (e.g. BSY etc.). I don't know if those requirements are listed in ATA-3, may be they popped up later. My "book" back then was d1153r8.pdf - IIRC, this is *only* by memory and may be completely wrong. But I do not remember having any hard times back then, it just worked for me. So perhaps you should try to wait for a short while prior to status register readings to give the driver controller time to respond - just a wild guess, mind you.


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

formatting link


formatting link

Original message:

formatting link

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.