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.

Rtfs sata example sometimes succeed but sometimes fail?

Other Parts Discussed in Thread: OMAPL138

Hello everybody:

I use the RTFS system to read and write SATA on the OMAP-L138 board. And I use bios_5_41_13_42, rtfs_1_10_02_32, pspdrivers_01_30_01.

I just import the example in ti\rtfs_1_10_02_32\packages\ti\rtfs\examples\sata\bios5\evm6748\ccs4. In most cases It failed and it stucked in the ATA_SubmitIdentify(). function, actually it stucked in m_delay(1u) function. But if I shake the interface of sata disk, sometimes the program can run successfully. And it could print all information I need.

So why is there such a phenomenon?What‘s the key problem?

Best wishes!

Regards

Samantha

  • Please make sure that you have proper SATA cable and no loose connection.
    Make sure that you have provided the proper power to Harddisk & motor is running.
  • Dear Titus S.
    Yes, I consider I am sure about that. Because if I run the sata_test example in the development packages of my omapl138 board, it could succeed. But under the same condition, the rtfs sata example failed.
    I really very confused about that. Do I need to modify any configuration, or about the clock?
    I am very thankful for your reply. Best wishes!

    Regards

    Samantha

  • Dear Samantha,

    Because if I run the sata_test example in the development packages of my omapl138 board, it could succeed. But under the same condition, the rtfs sata example failed.

    Did you RESET the board or did POWER OFF & ON for each and every load ?
    You have to apply reset for next reload the program on DSP.
  • Did you modify the example code at all? I've managed to run the example on my board successfully and have started to build an application based on it.

    Did you import it as 'filesystem' or as a CCS project? if it's the former, it won't import the .tcf file which is needed to correctly configure the chip.

    I did have mixed success with different hard drives, some would work, some wouldn't. I found that Seagate 3 Gbps drives work the best.

    How are you powering the SATA disk?
    Other than that, the fact that physical intervention is making a difference really does point to a loose connection.
  • Dear Chris B,

    First of all, thanks a lot for your reply.

    I did not modify anything of the example. I imported it as CCS4 project and the .tcf file was imported correctly. After all, it could succeed sometimes. And some information of my sata is as follows:

    [C674X_0] Version : 0001.0100

    [C674X_0] NumOfCmdSlots : 32

    [C674X_0] NumOfPorts : 1

    [C674X_0] Speed : 3 Gbps

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

    Actually, the sata of my omapl138 board is a chip called mini-sata(ADATA IMSS3110E-128GM-B), just attached to board by mini-sata interface, which doesn’t need the independent power. So is it not worked with the pspdrivers?

    Besides, you said you have started to build an application based on it, could you please give me your example as a reference?

    I am looking forward to your reply. Best wishes.

    Regards

    Samantha

  • Dear Titus S.

    First of all, thanks a lot for your reply.

    I tried and reset the board everytime, but it appears to the same phenomenon.

    Actually, the sata of my omapl138 board is a chip called mini-sata(ADATA IMSS3110E-128GM-B), just attached to board by mini-sata interface. So is it not worked with the pspdrivers?

    I am looking forward to your reply. Thanks a lot.

    Regards

    Samantha

  • Do you get any messages after that? I always get the information you've stated there even if I don't have a drive connected, but when I was trying different drives, some would say something like "SATA PHY not connected", and the drive wouldn't be accessible.

    Which board are you using that has a mini-SATA connection? I have to supply separate power to mine on the LCDK board.

    My application uses the exact same initialisation process as the sata_example project, so wouldn't be much help here. All I've done is taken out the parts that format the drive and create the extra partitions.

    Do you have anything running on the ARM side that could be trying to access the SATA peripheral? I had to disable SATA in the Linux kernel configuration on mine.
  • Dear Chris B,

    Yes, I got other information like following. When it failed, it stucked as I mentioned in the beginning. And its print stopped at the sentence [C674X_0] ATA Build: Debug.

    [C674X_0] ATA Hard Drive Application Task 0 Starting.

    [C674X_0] Configured ATA drive.

    [C674X_0] Version : 0001.0100

    [C674X_0] NumOfCmdSlots : 32

    [C674X_0] NumOfPorts : 1

    [C674X_0] Speed : 3 Gbps

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

    [C674X_0] Block Driver Initialization Succeeded

    [C674X_0] ATA Build: Debug.

    [C674X_0] SATA PHY initialized : online

    [C674X_0] Get drive ID DONE. A:

    [C674X_0] Clear partition DONE

    [C674X_0] This many cylinders: 488417

    [C674X_0] This many  sectors : 250069504

    My board is ICETEK OMAPL138-KB and with a mini sata. I didn’t use the ARM section before.

    Now I consider reducing the sata rate, because maybe it is instable at current rate. Do you know how to configure that? With DSP/BIOS 5_41_13_42 and pspdrivers_01_30_01.

    I am looking forward to your reply. Best wishes!

    Regards

    Samantha

  • As far as I know, the speed is negotiated as part of the SATA handshake. I'm not sure if the TI library allows you to configure this. I do know that some hard drives have jumper settings to configure the speed, so I think it might be dictated by the drive and not your software.

    My suggestion, if you can, is to try some different drives, if you can borrow one out of an old laptop or something. Just beware that if you run the SATA example, IT WILL FORMAT THE HARD DRIVE unless you stop the program after you see the messages in your last post.

    Personally, I've had good results with Seagate drives, but can't get Western digital drives to work.