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.

AM1808 sata PRD interrupt (P0IS.DPS) not getting set in PIO read command.

Other Parts Discussed in Thread: AM1808

I am using PIO read/write commands to access data in a hard disk. I am working on the sample code provided for SATA spin test from LogicPD. In order to mark the end of DMA transfer I thought of using P0IS.DPS interrupt. But it is never being set in my case. I am stuck now. I want a mechanism to know when the received data will be written in to system memory pointed by the PRD list.

  • Moving this to the AM1X forum.
  • Hi,
    P0IS.DPS interrupt based code written by you or taken from LogicPD BSL code itself ?
    I would like you to suggest to refer to the following SATA driver code from PSP drivers package.

    C:\ti\pspdrivers_01_30_00_06\packages\ti\pspiom\sata

    Also, please refer to the TRM for device initialization,reset,DMA setup, read/write etc., ; chapter "28.3.3" , page no: 1330
  • Sir,

    I am not actually using interrupt. I am trying to spin around  P0IS.DPS to confirm that DMA has finished transferring the data to system memory. Right now I have to wait for few ms after P0CI being set so that DMA completes transfer of received data data to system memory. I am in search of a mechanism to confirm whether or not that DMA has completed transfer of received data to system memory. sata_porting.zip

    I have gone through the TRM and AHCI specifications. Only way to mark the end transfer is P0IS.DPS bit. But in my case it is not being set.


    I using AM1808_StarterWare_1_00_03_03. But since starter ware does not support sata I am using the sample code provided by LogicPD with some modifications.

    compiler version TI v5.2.3

    CCS Version: 5.5.0.00077


    I am attaching the my project folder. Please do have a look at src/sata_utilities.c  line no: 1865.

  • Hi,

    I have gone through the TRM and AHCI specifications. Only way to mark the end transfer is P0IS.DPS bit. But in my case it is not being set.

    You mean, actual DMA transfer get completed but P0IS.DPS bit not getting set to inform that DMA transfer completed ?
    Did you confirm that DMA transfer get completed indeed ?
    Please make sure.
  • sir,

         Even after P0CI.[cmdslot] being cleared by HBA, it takes some time for DMA to transfer data to system memory. Initially I used delay for this. But it is not fair. I need some mechanism  to determine whether DMA completed transfer to system memory. So I decided to spin around  P0IS.DPS . After a while even though DMA completes the transfer, P0IS.DPS bit not getting set. I confirmed this by verifying the data.