ATA-5: When is it safe to issue a new command?

I'm trying to slim down an ATA-5 compliant driver I wrote for a small embedded system (no OS). I have always ensured that Status[BSY] is clear, Status[DRDY] is set, and if I ever get an error I would immediate clear the error by issuing a EXECUTE DEVICE DIAGNOSTIC command.

Now this takes some time an I'd like to "pipeline" my commands a by simply checking that Status[BSY] is clear and *either* DRDY is set *or* ERR is set. My thinking is that I will always report errors when they occur but I'd prefer to let that state sit there until I issue the next real command.

Does this seem logical? Correct?

Thanks.

--
- Mark ->
--
Reply to
Mark A. Odell
Loading thread data ...

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.