Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sir,Currently i am working on a Seagate PATA hard drive(Model No-ST3802110A , 80 GB),implementing ATA protocol on that.I am facing some problems while reading the data register of that hard drive.I am working to Standard ATA-3 PIO data in protocol.
I am facing a problem while executing Identify device command.I am 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 low whenever hard disk is not busy. So that is fine
2)Now selecting device by setting dev bit low. I am setting it low because it's status should match with the cable_Select pin. In my hardware cable select is connected to ground. So i am writing A0h in device/head register.
3)Reading the status register and checking for BSY and DRDY bits. I am 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 am getting BSY low and ERR bit low. That means no error has occured till now.
5(a)) i have provided a delay of 81 microseconds,before reading the data register.
6) Now I am checking for DRQ bit. But i am not getting DRQ = 1 as per the flow mentioned in ATA-3 Datasheet.
Even if I ignore DRQ bit, and start reading data register, i always get FF00, which is not as per outputs mentioned in datasheet for Identify device command. I am getting all 256 words as FF00h only.
Even i have tried the CHECK POWER MODE command,but i am getting the default values which are stored in Sector(Count and Number) and Cylinder(Count and Number) registers. I should get 00h or 80h or FFh in sector count register. But I am getting 01h which is the default value of this register. That means I am not getting proper response, also hard drive is not setting error bit in status register. So I am not able to guess where the problem is taking place.
So i am facing this problem for last many days and i am not getting any proper documents on internet to sort out this issue.If any body can support me in sorting out this issue,please support me for this.
Thanks to all who has send me the replies and also the question viewers for taking time to read ATA question.I have sorted out the issue and now now i am trying to read the first sector of hard disk.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.