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.

2.5" form factor Sata hard disk connection problem with EVM6748

Hi,

I am trying to connect 2.5" form factor Sata Hard disk from Toshiba (MK2365GSX) of 320GB capacity with EVMC6748 evaluation board. The behaviour of hard disk is not predictable. I am not able to  execute Identify device command properly. Some times it read proper serial number and other device identification details and most of the times it fails. If I am running sata example application provided with rtfs_1_10_01_31, it fails to get drive_id information. I am wondering because of this behaviour as I tested successfully these examples with conventional sata hard disks.

Regards,

Chandra Shekhar Mishra

 

  • Hi Chandra Shekhar,

    I suppose you are using BIOS PSP version 1.30.01.

    If so, then Please refer the section 3.3 of "BIOSPSP_SATA_Driver_Design" document, which explains the hardware limitations.

    The driver only supports ATA/ATAPI - 6 standard, Please check the HDD that you are using for the testing.

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

    Thanks for reply.

    You are right that I am using BIOS PSP version 1.30.01 .By looking into the Sata hard disk datasheet, it seems hard disk supports all standards from ATA-3 to ATA/ATAPI-8. I am not sure about the LBA addressing mode supported by sata driver. By debugging the response of Identify Device Command I found that it is responding Max LBA count as 0x0FFFFFFF instaed of 0x2542EAB0. All other fields are coming correct. Can you provide any other clue.

    Regards,

    Chandra Shekhar Mishra

  • Hi

    Make sure you are using the latest version of BIOSPSP/RTFS/EDMA packages. Can you confirm any other standard HDD is working with RTFS example. Identifiy command should work with any HDD, if not there may be issue with setup.

    Regards

    Ravi B

     

  • Hi Ravi,

    I am using BIOSPSP version 01_30_01, RTFS version 1_10_01_31, EDMA3_LLD_BIOS5_01_11_00_03 packages.

    Yes, 3.5" form factor hard disk from Western Digital (WD400BD) is working woth RTFS example and Identify command also.

    I am facing problem with 2.5" form factor hard disks from TOSHIBA. I tried 2 different hard disks from TOSHIBA with 2.5" form factor and both are not working.

    Regards,

    Chandra Shekhar Mishra

  • Hi Chandra Shekhar,

    You have mentioned about reading the invalid LBA address, in this case the command is returning with an error or is it coming back with the success flag?

    And also, could you please share the command sequence and the point at which the device identification fails (with the device information returned from the device)?

    These informations are valuable in analising the problem and provide the possible solution to the issue.

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

    I am following the RTFS example provided with C6748_dsp_1_00_00_11 sdk package. From application poit of view I am calling ATA_Init(), configureSata(), sataStorageInit() and than ATA_DrvInit(). While Debugging I found that ATA_DrvInit calls ATA_MED_Register() -> ATA_SubmitIdentify which internally calls ATA_SubmitReq(). After returning from ATA_SubmitIdentify,most of the times it fails and does not go for ATA_MED_Identify. Sometimes it goes for ATA_MED_Identify and read the 256 word Identification packet from sata Hard disk. During this I noticed that Identification word no 60 & 61 which should return total number of user addressable sectors always returns 0x0FFF FFFF instead of 0x2542 EAB0 mentioned in Hard disk data sheet. All other fields of Identification packet are correct and same as mentioned in hard disk data sheet.If our BIOSPSP Sata driver supports only 28 bit Addressing mode,than there could be a possibility that the total number of addressable sectors truncated to 0x0FFF FFFF.

    The application code is tested with 3.5" form factor hard disk and working fine. Let me know if I can provide any other details to debugg the same.

    Thanks & Regards,

    Chandra Shekhar Mishra

     

  • Chandra Shekhar,

    Thanks for the detailed description.

    Could you please share the 256 word identification packet from the sata hard disk for the command ATA_IDENTIFY (0xEC)?

    Since you are facing problem only on a perticular sata hdd, is there any chance that you have tested this sata hard disk on Desk PC or anywhere else? If not could you do that? [Sorry, this is very basic question, but i need to ask :( ]

    Have you tested 3.5" Toshiba sata hdd? if yes, was it working?

    Thanks and Regards,

    Sandeep K  

      

     

  • Hi Sandeep,

    Please find the attached 256 word identification packet screen shot in zip file(.rar) . Let me know if you have any issues with opening it.

    Yes, this 2.5" sata hard disk is working with PC. I tested almost four different  2.5" sata hard disks and all are behaving in the same manner.

    Now, I have only 3.5" sata hard disk from Western Digital ,which is working. Some times back I tested another Hard disk of 3.5"  which was working but I am not sure whether it was  from Toshiba or Fujitsu :)

     4812.Device Ident Screenshot.rar

    Thanks & Regards

    Chandra Shekhar Mishra

     

  • Chandra Shekar

    What is the console message you observe when you connect  2.5" FF Toshiba HDD, I would like to know whether the device is detected successfully and phy link is established b/w the AHCI controller and SATA HDD. To confirm this please provide the following data

    1) Dump of register contents of SATA_BASE (0x01E18000) , and port-0 registers (0x01E18100).  particularly P#STS (0x01E18128) & P#CTL(0x01E1812C).

    2) Can you make sure IDENTIFY command is successful.  Clear input buffer of 256 words with zero before issuing IDENTIFY command.

    I think if IDENTIFY command is successful then it should read the word (60 & 61) correctly as per spec of 2.5" HDD. As such there is no masking of these words in the driver.

    Regards

    Ravi B

     

     

  • Hi Ravi,

    Following is the console message

    **********************************************

    ATA Hard Drive Application Task Starting.

    Configured ATA drive.

    Version : 0001.0100

    NumOfCmdSlots : 32

    NumOfPorts : 1

    Speed : 3 Gbps

    SATA:AHCI-CAP:SNCQ SSNTF SLAP SAL SCLO SAM SPM PMD SSC PSC

    Block Driver Initialization Succeeded

    ATA Build: Debug.

    SATA PHY initialized : online

    ATA_DrvInit Success..

    **********************************************

    Also find the screenshot of Sata registers in attached zip file

    3716.Sata Reg Dump.rar

    Thanks & Regards,

    Chandra Shekhar Mishra

     

  • Chandra Shekhar

    The 2.5" FF HDD is supports only 48bit addressing mode.  The BIOSPSP Driver supports only 28-bit address. Your understanding was correct. That is why 2.5" FF is not working with driver and where as 3.5" HDD is working (which supports 28-bit addressing).

    Sandeep K has analyzed the 256 word of IDENTIFY command from Toshiba 2.5" HDD, the bit 10 of word 86 field is set (supporting 48-bit addressing). The word 100-103 of identification packet is having the value 600809538 (i.e 0x23CFA042), which is approximately equal to expected LBA value. This explains why the word 60-61 of device identification packet is having the invalid data.

    Regards

    Ravi B

     

  • Hi Ravi,

    Thanks a lot for detailed explanation. 

    Even though BIOSPSP  supports only 28-bit addressing, the only limitation should be that application can access Max LBA of 0x0FFF FFFF and it should be consistent. My problem is that 2.5" FF HDD detection is not consistent. Earlier I tried with 120GB Toshiba Hard disk, which can be addressed within 28 bit addressing but that  was also not detectable.

    Is there any limitation on EVM 6748 board hardware because of that 2.5" FF HDDs are not detected? It will be of great help, if  you can confirm this :)

    Also. I would like to know whether little bit of modification to BIOSPSP sata driver will make it supporting 48 bit addressing or not?

    Thanks & Regards,

    Chandra Shekhar Mishra

     

  • Hi Chandra Shekhar

    There is no hardware limitation here, because i could see the device is detected and negotiated with 3G speed when you connect 2.5" HDD. The dump of registers and console output confirms there is no limitation in EVM. Since driver supports only 28bit addressing, but looks like the Toshiba 2.5"FF not supporting 28-bit addressing read/write ATA commands. Hence the 2.5" HDD not responding to the 28-bit ATA command set.This requires modification in the driver to implement the 48-bit addressing feature.

    Regards

    Ravi B

     

  • Hi Ravi,

    Actually there is an errata from Logic PD, where they have changed some components on sata interface in there revision B of SOM board. Also there is some discussion on clock and data termination in following thread

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/89006.aspx

    That is why, I wanted to confirm from hardware side.

    Also, By going through response of Identification command of 2.5" HDD word [80] tells that it supports  ATA-3 to ATA-8 and I believe 28 - bit addressing is supported by ATA-3 as well. Also I modified sata driver to read Max LBA count from location 100-103 and got actual LBA count. But as I told media register is not consistent it not going to solve my problem. Please let me know if something I am missing here. I am not able to attach HDD datasheet here , I will mail it to you for any reference.

    Thanks & Regards

    Chandra Shekhar Mishra

  • Chandra Shekhar,

    chandrashekhar mishra said:
    I am trying to connect 2.5" form factor Sata Hard disk from Toshiba (MK2365GSX) of 320GB capacity with EVMC6748 evaluation board. 

     

    I think there is a typo in this post while specifying the Toshiba HDD part number - MK2365GSX. I think, this should have been the MK3265GSX, am i right? Since the data sheet shared by you has the MK3265GSX in the product list and which is 320GB Sata HDD.

    Could please confirm on this? 

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

    Yes, you are right there is a mistake. HDD Part number is MK3265GSX.

    Regards,

    Chandra Shekhar Mishra

  • Hi Chandra Shekhar,

    As per your observation the behaviour of the Toshiba SATA HDD is not consistent, I want to know that whenever the ATA_drvInit() fails, what is the reason for the failure? Is the driver is setting the error after receiving the info from the device or the device itself comes back with an error? and what is an error code?

    Whenver device identification passes, then are you able to do any IO with the device?

    Also you have mentioned that the 3.5" Western digital HDD is working for you, have ever tried to compare its command sequence or the identification packet with the 2.5" Toshiba HDD?

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

    After executing ATA_SubmitIdentify(), I have taken the screenshot of status structure returned. Please find the attached Status_struct_Dump.rar folder which has screenshot of status struct for error condition as well as without error condition.

    1462.Status_struct_Dump.rar

    Yes, Whenever device identification passes ,I am able to do IO with the device and sometimes able to do block read and or block write. But most of the time during Block read and/or Block write it hangs and stuck inside while loop of ahciPortGetFreeCmdSlot() function defined in Ahci.c. For your reference, it stuck inside following loop
     

    /* check free command slot from currently
        active cmds */
     do
     {
     word = port->regs->PxCI;
     } while(word);

    Also, I believe command sequence should be same for 3.5" or 2.5" FF HDD as both supports ATA 6 standard. Let me know if I can provide any other info.

    Thanks & Regards,

    Chandra Shekhar Mishra