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.

DM8107 USB DMA GRNDIS mode error

Other Parts Discussed in Thread: DM8107

Hi all,

I am DM8107 user.
I need to receive TS data from DVB-T usb dongle and save data to SATA hard drive.
While I implement it on DM8107, i get a problem while both SATA and USB work at the same time.
The problem is that i will lost TS packets on DM8107 because there is too many usb interrupts.
After reading this thread
http://e2e.ti.com/support/embedded/starterware/f/790/t/281413.aspx

I had open the GRNDIS mode, below is the modified code:

//*******************************
ti81xx.c

int __devinit cppi41_init(u8 id, u8 irq, int num_instances)
{
  ...
  ...
 //cppi_info->version = usbss_read(USBSS_REVISION);
 cppi_info->version = 0xF;
 
 ...
 ...
}
//*********************************

This modification will decrease the USB interrupt times so that USB can tansfer TS packets well while SATA works,
but it will cause error returned in urb size sometimes, it means that received data length is less than i want (alway loses 512 bytes).
The error occurred while I Tx/Rx control data to(from) A/B endpoint and get TS packets from D endpoint.

I have been working for one month on this, the problem still persisted.

Any suggestions?
thansk

  • Moving this to the DM814X forum.

  • Zi-Luen,

    I am working with DM814x/AM387x device, thus I am not familiar with the DM8107 and its SDK, but I will try to provide you some pointers.

    Please go through the below links:

    http://processors.wiki.ti.com/index.php/Usbgeneralpage

    http://processors.wiki.ti.com/index.php/DM81xx_AM38XX_USB_User_Guide

    DM8107 TRM, chapter USB, section Interrupts.

    Also we have some usb related patches in the ti81xx master branch:

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog;h=refs/heads/ti81xx-master

    Here are some patches that might help you, but I recommend you to check all usb related patches that are not applied to your linux kernel.

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=cec9c181034cef2ca52dfa4eb181c0dcbcb0a0de

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=675ff65ba30585348f13f0b8bf3178cc8287b875

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=97101e6c43c0e956dbc2863bd3e50ab70f987a91

    Also have a look on the USB known issues and workarounds:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_04.04.00.02_Release_Notes#USB_2

    Regards,
    Pavel

  • Pavel, thanks for you reply

    ==============================

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=cec9c181034cef2ca52dfa4eb181c0dcbcb0a0de

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=675ff65ba30585348f13f0b8bf3178cc8287b875

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=97101e6c43c0e956dbc2863bd3e50ab70f987a91

    ==============================

    All these three patches had already updated in my 8107 RDK, and it still can't solve my problem.

    I noticed that if use the dma transparent mode, the urb returned size error will be fixed by checking data toggle bit, but I can't use this mode because it will lose data while SATA works.

    Why DM8107 don't use the dma GRNDIS mode by default?

    Is it possible that generate interrupt just once when transfer completed in dma transparent mode? 

     

    thanks