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.

TMS320C6748 SATA Interface

Other Parts Discussed in Thread: TMS320C6748, CCSTUDIO, OMAP-L138

Hi,

I want to use SATA Interface of TMS320C6748 for connecting Hard Disk. The main purpose of Hard disk is to store raw data in predefined Format. Is it possible to use PSP given by TI for reading and writing data to hard disk without using RTFS(Real Time File System).

Regards,

Chandra Shekhar

 

  • Yes the SATA driver is available in the C6748 bios driver pakage.  You can refer to the datasheets for the performance numbers.

    regards

    swami

  • chandra shekar

    Yes, you can use BIOSPSP. You can do RAW read/write to SATA HDD through BIOSPSP block media interface. Please refer to NAND raw sample application example of BIOSPSP.

    Regards

    Ravi B

     

     

  • Hi Ravi and swami,

    Thanks for your prompt reply. I am trying to go through NAND sample example but I am not able to open its DSP/ BIOS configuration file as it is giving following error.

    js: "C:/CCStudio_v3.3/bios_5_31_02/xdctools/include/utils.tci", line 784: exception from uncaught JavaScript throw: Error: Can't find Platform.tc[ip] file for 'ti.platforms.evm6748'

        "./nandSample.tcf", line 2
        "./<stdin>", line 4


    Correct any script errors in C:/Program Files/Texas Instruments/pspdrivers_01_30_01/packages/ti/pspiom/examples/evm6748/nand/edma/build/nandSample.tcf
    using the Configuration Tool or a text editor, if necessary.


    TConf initialization arguments:
    -e environment['config.importPath']='C:/CCStudio_v3.3/bios_5_31_02/packages' -e environment['config.scriptName']='nandSample.tcf'

    Could you pls help me to solve this problem?

    Regards,

    Chandra Shekhar Mishra

     

  • Hi Ravi ,

    By going through the code of blkmedia drriver it looks that it supports only MMCSD and NAND devices. I am not able to understand how it will support Hard disk on SATA interface. If I am wrong can you elaborate little bit how it can be used with SATA driver.

    Regards,

    Chandra Shekhar Mishra

  • chandra shekhar

    I think you are referring to old BIOSPSP driver. Please refer to latest BIOSPSP driver supports SATA .

    Regards

    Ravi B

     

  • Hi Ravi,

    Recently I got EVM 6748 board and working on Sata interface in RAW mode. Sata example provideed with RTFS is working fine with board. As you suggested I am taking NAND sample example as a reference to make sata in RAW mode. My code stuck in ATA_DrvInit() function while it is working fine with RTFS example. After debugging I found that it is stuck in ATA_SubmitIdentify() functionwhile providing delay after ATA_SubmitReq(). Could you please help me out from this point.

    Regards,

    Chandra Shekhar Mishra

  • Chandra shekhar

    Please refer to the following piece of code and check you are following the same. For information please refer to usbmscdev example in biosusb package which exposes the SATA as raw device to windows PC. Please download the biosusb package at http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSUSB/index.html 

    printf("SATA media selected for mass storage \n" );
     printf("Ensure SATA Media is connected \n" );

     /* initialize blockmedia */
        result = PSP_blkmediaDrvInit(hEdma[0], 0x00, 0x02u, 4096u);

     /* initialize the ata driver */
     ATA_Init ();

     /* configure platform to enable sata  */
     configureSata();

     /* initialize the sata controller driver */
     sataStorageInit();

     /* initialize the ATADrv Stack */
     ATA_DrvInit();

     /* register the SATA Storage media with blkmedia */
     driverDev = PSP_BLK_DRV_ATA0;
        drvIoctlInfo.Cmd = PSP_BLK_DRV_SETRAWDEV;
        drvIoctlInfo.pData = (Ptr)&driverDev;
        PSP_blkmediaDrvIoctl((Ptr)&device, &drvIoctlInfo);
     printf("registering storage with blockmedia Done \n" );

     

  • 2100.sataRaw.zip

    Hi Ravi,

    Thanks for reply. I am also following the same sequence and it looks that SATA HDD is initiliazed properly. But the problem is to perform read/write or ioctl operation from my application it needs to get get handle of sata through PSP_blkmediaAppRegister() call. There it is failing. Following is sequence of printf messages I am getting while running my code

    /*****************************************

    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 Done..

    SATA_RAW_SAMPLE: Currently 7 device is set as a Raw Device

    SATA_RAW_SAMPLE: Ioctl for setting SATA device as RAW device is successfull

    SATA_RAW_SAMPLE: Currently 5 device is set as a Raw Device

    SATA_RAW_SAMPLE: Media for remote client can not regsitered

    ***************************************************************************************/

    For reference I am attaching my project also if it can help you to find the problem I am facing :)

    Thanks a lot,

    Chandra Shekhar Mishra

     

     

  • Chandra shekar

    Looks ok from your code,  Have you defined all the initialization of sata-task in the .TCF file. please refer to.tcf file in the usbdevmsc example of biosusb package.

    .TCF file init for sata

    bios.PRD.create("PRD0");
    bios.PRD.instance("PRD0").order = 1;
    bios.PRD.instance("PRD0").comment = "sata timer0 ";
    bios.PRD.instance("PRD0").period = 1000;
    bios.PRD.instance("PRD0").mode = "one-shot";
    bios.PRD.instance("PRD0").fxn = prog.extern("_sataTimer0_task", "asm");
    bios.PRD.create("PRD1");
    bios.PRD.instance("PRD1").order = 2;
    bios.PRD.instance("PRD1").comment = "sata timer1 task";
    bios.PRD.instance("PRD1").period = 1000;
    bios.PRD.instance("PRD1").mode = "one-shot";
    bios.PRD.instance("PRD1").fxn = prog.extern("_sataTimer1_task", "asm");
    bios.PRD.create("PRD2");
    bios.PRD.instance("PRD2").order = 2;
    bios.PRD.instance("PRD2").comment = "sata timer2 task";
    bios.PRD.instance("PRD2").period = 1000;
    bios.PRD.instance("PRD2").mode = "one-shot";
    bios.PRD.instance("PRD2").fxn = prog.extern("_sataTimer2_task", "asm");
    bios.PRD.create("PRD3");
    bios.PRD.instance("PRD3").order = 2;
    bios.PRD.instance("PRD3").comment = "ata pwrm task";
    bios.PRD.instance("PRD3").period = 100;
    bios.PRD.instance("PRD3").mode = "one-shot";
    bios.PRD.instance("PRD3").fxn = prog.extern("_ataPwrmTask", "asm");

    Regards

    Ravi B

     

  • Hi Ravi,

    I have already defined all the initialization of sata task in .tcf file. I would like to share you the findings I got during debugging to locate the problem.

    1) First of all with sample application I shared in the previous post I found that my application got stuck in ATA_DrvInit() function call. After placing breakpoints and step into code I found that the code stuck inside ATA_SubmitIdentify() function inside following while loop

    /*********************************/

    ATA_SubmitReq (pDevice, pReq);

           while  (pReq -> Retry != 0)
          {
             //PAL_osWaitMsecs (1u);
              m_delay(1u);
              //pReq -> Retry--;
          }

    *********************************/

    It looks  that  value of  pReq -> Retry is not getting decremented and my application get stuck here only.

    2) To overcome that I unmasked the commented line of code pReq -> Retry --;

    3)This step force fully pass the ATA_DrvInit() function  and detect the sata HDD but later fails during application registration .

    I am wondering how same ATA_DrvInit() does not give any problem with RTFS sample code but it creates problem with my application code.If this can help you to find any mistake I made in my application.

    Regards,

    Chandra Shekhar Mishra


  • Hi Ravi,
    As per our teleconversation I placed breakpoint inside interrupts and got following findings:

    1) Inside ATA_SubmitIdentify(), after executing ATA_SubmitReq() , code executed ahciInterrupt() ISR.
    2) ISR calls AhciPortIntr(), inside this function it calls sataIntrHandler() inside Sata_intf.c.
    3) Inside sataIntrHandler(), attached media handler i.e ATA_IntHandler() should be invoked which is not happening as ATA_IntHandler ==NULL.
    4) My code never reach inside ATA_IdentHndlr() routine of Ata.c

    I am also attaching the sata register contents after calling ATA_SubmitReq()

     

     

  • Hi Ravi,

    As sata register contents are not visible in previous post ,I am attaching it here once again.

     

     

    Thanks & Regards,

    Chandra Shekhar Mishra

  • Chandra,

    I too am having this problem. Same libraries, but running on the DSP side of the OMAP-L138 (core is still a C6748).

    This blog entry seems to just end without a resolution. How did you solve this problem?

    TIA,

    Kevin

  • Hi Ravi,

    This is an urgent request.

    I have a few questions regarding the C6748 DSP and the SATA drive:

    But before that, here is a bit of background information:

    The customer would like to use the DSP only version of the C6748 chip. They do not want to use the ARM core as this is a battery powered application where every milliwatt counts. However, to log the acquired DATA, they need to use the SATA port to write to a Hard Drive.

    Questions:

    1. If the customer is using the C6748 version without the ARM core, can they use the SATA interface? Is it accessible from the DSP?
    2. If, yes, are there any drivers in TI-RTOS/BIOS_C6SDK that support SATA using the DSP as the host? If yes, could you please point me to that driver?
    3. Now if the C6748 DSP chip does not have the SATA interface enabled or we have no drivers that would allow the DSP to control the SATA port, would you be able to tell us what is the power consumed by the ARM core at the lowest frequency it needs to run to support the SATA function?

    Thanks and best regards
    Seb

  • Seb,

    You are appending a new issue on a very old thread -- not a good way to get answer as the original responder may be long gone, which is what has happened in this case. Furthermore, your question doesn't seem to be specific at all to TI-RTOS, so others monitoring this forum will be probably not be well positioned to knowledgeably respond. I would advice you to post this question on a new thread in the E2E C674x forum.
  • Dear Chandra Shekar
    I met the same question with you, as e2e.ti.com/.../492056. And the sata example provided with RTFS failed too.
    If you solved your problem, please reply me. Thanks a lot.
    Regards,
    Samantha