This is how it looks like:
(Values are signed char, so real value of status register is 0x86)
This is my code:
Code: Select all
while((ata_readstatus(dev) & ATA_STATUS_BUSY) == ATA_STATUS_BUSY)
;
if((ata_readstatus(dev) & ATA_STATUS_BUSY) == ATA_STATUS_BUSY) {
ata_srst(dev);
}
if((ata_readstatus(dev) & ATA_STATUS_BUSY) == ATA_STATUS_BUSY) {
dbg_print("ATA device is busy");
dbg_descrval("STATUS: ", ata_readstatus(dev));
return 0;
}
Does anybody know what can cause such problem?