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.

sata + dsp + arm

Hello,

 

I have an application which acquires data from an ADC at very high frequency (2048 points at 80Msamples from ADC at 500Hz sample rate) and I want to save the data in a external HD using SATA.

I have a code which is working in a TMS320C67xx and I want to port it to OMAP L138. I am trying to use the example in the document "TMS320C674x/OMAP-L1x Processor

Serial ATA (SATA) Controller" but the code is missing many variables. Has anyone implemented something related to SATA using the DSP? 

Another possibility that I am studying is to use an embedded linux in the ARM side (it has the SATA driver), but I don't know it the OS can keep my acquisition rate stable and also adapt my DSP code to the embedded linux.

 

Can anyone help me?

 

Thanks in advance

 

 

 

 

  • Hello Cesar,

    LogicPD has a sample code.

    http://www.logicpd.com/products/development-kits/zoom-omap-l138-experimenter-kit

    I think if you register and go to the support link then you can download the sample code.

    Thanks,

    Tai

  • Hello Tai,

    I am using the project evmomapl138_test_sata which executes a test that spins the SATA disk.

    I've connected an external HD to the sata connector in the board and used an external power supply to the device. 

    The results I got are always "-> ...disk spin-up failed"'. 

    My evaluation SOM board revision is 1013525 REV5. 

    Thanks for the help.

     

    Reggards

     

    César

     

  • Hello Cesar,

    If Disk spin up failed this means that there is a problem with “Device Detection” and/or “Speed Negotiation”. In other words, Link has not been established.

    What is the content of sataRegs->P0PHYCR and sataRegs->P0SSTS?

    Thanks and regards,

    Tai

  • Hello Tai,

    sataRegs->P0PHYCR = 2149070152

    sataRegs->P0SSTS = 0x0

     

    The code fails at this point

    while (((sataRegs->P0SSTS & AHCI_PxSCTL_PxSSTS_DET) !=0x3) && (retryCount < DETECT_TEST_RETRY_COUNT))

    {

    USTIMER_delay(DETECT_TEST_RETRY_DELAY);

    retryCount++;

    }

    It seens the device is not been recognized by the firmware. But I didn't change anything in the code. 

    I am using code composer v5 and when I import the project it is converted from version 3.1.0 to 4.0.0. Perhaps there is an incompatibility or I am missing some settings in the project or in the hardware ...

     

     

    Regards,

    Cesar

  • Hello Cesar,

    Can you make sure that you have a live Drive. It seems that the Drive is not powered up at all. Is it possible if you would take a picture of your setup? Something seems to be wrong here. sataRegs->P0PHYCR you reported is 0x8018_3548. Try changing that value to 0x8018_3048. Also, what is the content of sataRegs->P0SERR?

    Thanks and regards,

    Tai

  • Hello Tai,

    The example now is working properly. Thank you very much.

    As I could see, with your advice it changed the RXCD (clock/data recovery algorithm) to

     

    (Second order, low precision, threshold of 1. Best response to changes in frequency offset and

    fastest lock time, but lowest precision frequency offset matching. Suitable for use in systems with

    spread spectrum clocking.)

     

     

    and the RXTERM (Receiver Termination) configuring it to

    ( Common point set to VSSA. This configuration is for applications that are AC coupled at the receive

    end that require a 0V common mode. Common mode termination is direct to VSSA.)

    The changes are related to my version of the boards? Or is it related to my test setup? (photo is attached)

     

    Now I am trying to perform a DMA Write Transfer using the code example inside the document "TMS320C674x/OMAP-L1x Processor

    Serial ATA (SATA) Controller". But the code does not compile at all, and it is missing many variables. Adapting the document's example code to the Spinning Up Device example (which now works), I managed to somehow compile the code. But the following variables I don't know how to initialize:

    sata_input_filePageSize

    sata_input_prdLength

    sata_input_prd_dataBuffLen

    sata_input_startAddress

    Could you help me with this issue?

    Thanks again.

     

    Regards,

     

    César

  • Hello Cesar,

    I see that you got the device spinned up. I think you powered it up correctly to get it going. Can you tell what had changed to get the drive spinning? 

    The PHY configuration value you started up with and the one I sent you should both work. Not sure the purpose of the filed definitions you pasted. It would result with confusing the question.  

    Having said that, on the example code the below variables are set to the following values. 

        sata_input_prdLength = 2;

        sata_input_prd_dataBuffLen = 0x2000;

        sata_input_filePageSize = 8;

        sata_input_startAddress = 2;

    You would need to understand the fields that these variables are initializing. This is documented within the AHCI specification 1.1. 

    The sata_input_startAddress can be any sector number. The sample code expects you to use a 28bit addressing and this means that the starting sector number can be any sector number between 0 and 2^28. This is part of the ATA and SATA specification. You will require the standard spec knowledge to program the controller. The information within the user’s guide only captures the spec implementation part of the information.

    Hope this helps.

    Regards,

    Tai

  •  

    Hi Tai

     

    My application is also similar to above ie data acqistion and data recording in SATA.

     

    iam facing same problem of "-> ...disk spin-up failed"

     

    Iam using hawk board, i had connected SATA connecter to external SATA HDD and power from external SMPS which is sourcing hawk board as well..

     

    When i tried to run the "SATA test" example available logic pd site, i found same result ""-> ...disk spin-up failed".. i tried another SATA HDD i found similar results

     

    When checking the sataRegs->P0PHYCR i found it to be 0x80183548.. sataRegs->P0SSTS is found to be 0x0

    I changed sataRegs->P0PHYCR to 0x80183048.. but still same error appears..

    I tried in ARM side in linux, but dmesg shows "SATA link down".. i cant able to see anywhere in the /dev folder after prompt appears

    Kindly guide me to solve this issue

    Regards

    Vijayabharathi C

     

  • Hi Vijayabharathi,
    It looks like that the issue you are having points to the fact that the Hard Disk Drive is not powered. That seems to be the problem.
    P0SSTS = 0 is not an expected status. Could it be the SMPS cannot power the HDD sufficiently?
    Thanks and regards,
    Tai Nguyen
  • Hi Thanks 4 reply... But when i touch the HDD i feel the HDD is running.. kindly suggest me how to diagonise and solve this issue

  • Hi Vijay,

    Please recheck the cable. The processor is not seeing the HDD.

    Thanks,

    Tai

  • Hi Tai

     

    Thanks.. We found the IC related to clock circuitry of SATA is broken in our board. We replaced and now SATA is passing success for "Spin off test".. Even in the Linux environment, sata is detecting

     

    Regards

    Vijayabharathi C

  • Hello everyone.

    I work with Cesar Ofuchi and we have managed to read and write data from our SATA device using the test routines provided.

    I have noticed that for the spin up process to work, the routine has to be run right after the device has been powered up. If the device was already running and has already been spin up then the routine fails.

    What has to be done for the firmware to detect that the device does not need to be spin up again? Does sata_utilities.c already have this funcionality?

    Thank you,

    Rafael Daciuk

  • Hello

    Did you wrote this application (Data->sata) using the dsp?

    If yes can you please help me (send me your application)?

    Tnx

    PF

  • Hello PF Melamed,

    I used the example and it worked. What exactly do you need? 

    Regards,

    Cesar

  • Hello PF Melamed,

     What exactly do you need? 

    Regards,

    Cesar

  • Hi Cesar,

    I want know how to test the speed when read or write between the DSP and the Sata disk?I can spin up the disk using the sample code now.If you have the code to test the speed?Thanks!

  • Hi Cesar and Tai

    Can you please send me the project that test read/write to the SATA device (I already have the the project that test spin) but need to test read/write to SATA.

    Thanks,

    Ayman

  • Hi all,

    I am following up on the above request for the test read/write project in CCS...