Hard disk drive selection
Posted: Fri Apr 25, 2008 6:22 am
Hello All,
Currently I am working on hard disc drive and sending commands to it. Only Execute Device Diagnostic command is working in that case. If I give any other commands to drive such as check power mode, identify device etc. then it is not giving command aborted but not giving desired output also. Suppose I give, check power mode command then I should get 00h in sector count register if device is in standby mode. FFh , if device is in active mode, 80h if it is in the idle mode. But instead of expecting these values, i am getting 01h in sector count register, which is default value of this register. Also drive is not setting bit ERR of status register. That means command is not aborted. But not getting desired outputs. What could be the reason? How would I know whether drive has accepted my command? Whether my drive got selected properly? What are the methods for selecting drive? i.e. what value of DEV bit in the device/head register should be?
Yours suggestions will be helpful for my project.
Regards,
Sneha
Currently I am working on hard disc drive and sending commands to it. Only Execute Device Diagnostic command is working in that case. If I give any other commands to drive such as check power mode, identify device etc. then it is not giving command aborted but not giving desired output also. Suppose I give, check power mode command then I should get 00h in sector count register if device is in standby mode. FFh , if device is in active mode, 80h if it is in the idle mode. But instead of expecting these values, i am getting 01h in sector count register, which is default value of this register. Also drive is not setting bit ERR of status register. That means command is not aborted. But not getting desired outputs. What could be the reason? How would I know whether drive has accepted my command? Whether my drive got selected properly? What are the methods for selecting drive? i.e. what value of DEV bit in the device/head register should be?
Yours suggestions will be helpful for my project.
Regards,
Sneha