This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVMC6748 BSL sata example problem

Hi,

I am using EVMC6748 eval board from LogicPD and testing test_sata example provideed with Board support library. It calls spinUpDeviceAndWaitForInitToComplete() function for initializing sata Hard disk. I am able to do sata hard disk init and spin up process. After that I am trying to call invokeIdentifyDevCmd() to get device information but I am unable to do that as this function never returns. Also, sata_intc_setup() function is giving error as I tried to add it in build.Anybody can share their experience to resolve this issue as I need to connect hard disk w/o operating system and this example is very close to that.

Thanks,

Chandra Shekhar Mishra

  • Hi,

    In order to minimize as to where your system is broken, you might want to work in polling method for a while and move on to using ISR.

    First thing to do is to insure that you have received a good Device Signature from the attached device. If you have reached a position where you can be able to post commands, you probably have passed this stage gracefully. But it is still good to check. After spin-up check if you receive a good Device signature H2D FIS.

    Assuming that you have good device status, check for your P0CI register (sataRegs->P0CI) content after posting the invokeIdentifyDevCmd(). Depending on the command slot you are using, if the command has not completed for any reason, you will see a bit remaining set. If that is the case, you probably are having some kind of issue and no telling what that issue could be.

    What is your P0PHYCR setting (sataRegs->P0PHYCR)? Change this value to 0x8018_3048 and see if this helps.

    Best regards, Zegeye

  • Hi Zegeye Alemu,

    As per your suggestion, I disabled all interrupts for testing of invokeIdentifyDevCmd() and found following observations

     1) I received good Device signature as(0x00000101)

    2) After posting the invokeIdentifyDevCmd() I found sataRegs->P0CI = 0x00000002 as I sent this command in slot 1.at the same time other register values are like this

    POIS = 0x2000 0000, POTFD = 0x0000 01D0, POSERR = 0x0000 0800.

    3) After calling submitCmd() inside invokeIdentifyDevCmd() following steps are called

    // Wait until a PIO Setup FIS is received from device prior to continuing.

    while(sataRegs->P0IS & AHCI_P0IS_PSS == 0x00000000);

    // Check for the Data Transfer Direction (BYTE1.D = 1/0 => Read/Write)

    while (((RcvFis.PSFIS.DW0.BYTE1 & 0x20) != 0x20));

     I am not able to understand that even it shows PIO setup FIS received, it always stuck in next step as there is no data in PSFIS.

    4)Earlier P0PHYCR value was 0x80183948, but even after changing it to 0x80183048 there is no change in status.

    Regards,

    Chandra Shekhar Mishra