• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM64x DaVinci Video Processor Forum » problem in ethernet transmission using dm6437 dvdp
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

problem in ethernet transmission using dm6437 dvdp

This question is not answered
Rutcha ghatpande
Posted by Rutcha ghatpande
on Apr 01 2009 01:40 AM
Prodigy100 points

i am trying to send video over ethernet  using the tms320dm6437 dvdp from board to the PC.

For capturing and encoding the video i have used video_encdec.pjt(from dvsdk) and for ethernet emac.pjt given by TI.

I send the h.264 encoded video buffer to the following code

"iCount" is the no. of packets which varies with each frame size.

The packet_data[0] to packet_data[15] is the header part

*************************************************

 for (i=0 ; i<iCount; i++)/////
    { 
      ptr = & packet_data[16];
  memcpy(ptr, encoded1 + TX_SIZE * i,TX_SIZE);
  
     pDesc            = pDescBase + 1;
     pDesc->pNext     = 0;////////
     pDesc->pBuffer   = packet_data;
     pDesc->BufOffLen = 1514;
     pDesc->PktFlgLen = EMAC_DSC_FLAG_OWNER
                     | EMAC_DSC_FLAG_SOP
                     | EMAC_DSC_FLAG_EOP
                     | 1514;

     pDescTx = pDescBase + 1;
    EMAC_TX0HDP = ( Uint32 )pDescTx;

        /* Busy period */
    _wait( 10000 );

    /* Manually check ISR, if using interrupts this will be done automatically */
    EMAC_isr( );
}

**********************************************

But for each frame i am getting the same data in every packet and this data corresponds to the data of the last packet of previous frame. So for the first frame i get the data which was present previously (i.e. before running) in the "packet_data".

Same thing happens for raw data also...

Thankyou in advance 

dm6437 ethernet dm6437 EVM encode
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • tlee
    Posted by tlee
    on Apr 01 2009 09:31 AM
    Mastermind22760 points

    Rutcha,

    I assume that you are trying to transmit TX_SIZE bytes of data, but the packet descriptors are telling EMAC to transmit 1514 bytes.  Is TX_SIZE equal to 1514?

     

    -Michael

    ----------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rutcha ghatpande
    Posted by Rutcha ghatpande
    on Apr 01 2009 10:44 AM
    Prodigy100 points

    hi....

    no TX_SIZE = 1498 i.e. 1514-16 bytes of header. so each packet contains 1498 bytes of data.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • tlee
    Posted by tlee
    on Apr 02 2009 14:24 PM
    Mastermind22760 points

    Rutcha,

    The packet size that you program into the descriptors should include some header-type data bytes like DST ADDR, SRC ADDR, and LEN.  Please ensure that this is handled in the program.  You can see a figure of the frame in Section 2.4.1 of the EMAC user guide (spru941a).

    Do you have a simple application that is able to transmit EMAC packets in a way that matches your expectations?  We can use that as a starting point to isolate the problem.

     

    -Mike

    ----------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rutcha ghatpande
    Posted by Rutcha ghatpande
    on Apr 03 2009 06:56 AM
    Prodigy100 points

    yes I have included the dst and src addresses in header and I have tested the simple application to send ethernet packets :

    #include "emac.h"

    #define TX_BUF    1514//////
    #define RX_BUF    1536

    Uint8 packet_data[TX_BUF];
    void* ptr;//////
    Uint8 packet_buffer1[RX_BUF];
    Uint8 packet_buffer2[RX_BUF];
    Uint8 packet_buffer3[RX_BUF];
    Uint8 packet_buffer4[RX_BUF];
    Uint8 packet_buffer5[RX_BUF];
    Uint8 packet_buffer6[RX_BUF];
    Uint8 packet_buffer7[RX_BUF];
    Uint8 packet_buffer8[RX_BUF];
    Uint8 packet_buffer9[RX_BUF];
    Uint8 packet_buffer10[RX_BUF];

    /*
     *  We use pDescBase for a base address. Its easier this way
     *  because we can use indexing off the pointer.
     */
    EMAC_Desc* pDescBase = ( EMAC_Desc* )EMAC_RAM_BASE;

    /*
     *  The following are used to allow the ISR to communicate with
     *  the application.
     */
    extern volatile int RxCount;
    extern volatile int TxCount;
    extern volatile int ErrCount;
    extern volatile EMAC_Desc *pDescRx;
    extern volatile EMAC_Desc *pDescTx;
    extern Uint8* dest;
    Int16 verify_packet( EMAC_Desc* pDesc, Uint32 size, Uint32 flagCRC );

    /* ------------------------------------------------------------------------ *
     *                                                                          *
     *  emac_test                                                               *
     *      EMAC tests to send data to external loopback cable.                 *
     *                                                                          *
     * ------------------------------------------------------------------------ */
    Int16 emac_test( )
    {
        Int32 i;
        Int16 errors = 0;
        Uint32 status;

        Int32 emac_timeout = 0x100000;
        Int32 timeout;
        EMAC_Desc* pDesc;
     dest = (void*)dest;      //one frame data

        /* ---------------------------------------------------------------- *
         *                                                                  *
         *  Setup EMAC                                                      *
         *                                                                  *
         * ---------------------------------------------------------------- */
        emac_init( );
    * ---------------------------------------------------------------- *
         *         
                                                                  *
         *  Setup TX packets                                                *
         *      Send 2 copies of the same packet using different sizes      *
         *                                                                  *
         * ---------------------------------------------------------------- */
      packet_data[0]=0x00;//
      packet_data[1]=0x11;//
      packet_data[2]=0x2F;//
      packet_data[3]=0xF4;
      packet_data[4]=0x6F;
      packet_data[5]=0x28;
      packet_data[6]=0x00;
      packet_data[7]=0x0E;
      packet_data[8]=0x99;
      packet_data[9]=0x02;
      packet_data[10]=0x99;
      packet_data[11]=0x3C;
      packet_data[12]=0x08;
      packet_data[13]=0x09;
      packet_data[14]=0x00;
      packet_data[15]=0x00;
       // for ( i = 12 ; i < TX_BUF ; i++ )  ////////////////
       //     packet_data[i] = i;
      
     for (i=0 ; i<553; i++)/////
    { 

        ptr = & packet_data[16];
     memcpy(ptr, dest+1498 * i,1498);
        pDesc            = pDescBase + 10;
        pDesc->pNext     = 0;////////
        pDesc->pBuffer   = packet_data;
        pDesc->BufOffLen = 1514;
        pDesc->PktFlgLen = EMAC_DSC_FLAG_OWNER
                         | EMAC_DSC_FLAG_SOP
                         | EMAC_DSC_FLAG_EOP
                         | 1514;
     


          /*
         *  Start TX sending
         */
        pDescTx = pDescBase + 10;
        EMAC_TX0HDP = ( Uint32 )pDescTx;

        /* ---------------------------------------------------------------- *
         *                                                                  *
         *  Normally there would be a interrupt to service the EMAC RX/TX   *
         *  transmission.  Instead a short pause and manually call the ISR  *
         *  Interrupt Service Routine to check on the status.               *
         *                                                                  *
         *  You can later add in the ISR and the code to support.           *
         *                                                                  *
         * ---------------------------------------------------------------- */

        /* Busy period */
        _wait( 10000 );

        /* Manually check ISR, if using interrupts this will be done automatically */
        EMAC_isr( );
    }

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • tlee
    Posted by tlee
    on Apr 06 2009 10:07 AM
    Mastermind22760 points

    Thanks Rutcha.  The example really helps me put your code snippet into context.

    Are you receiving the correct number of packets?

    Instead of the _wait() statement, can you try a while loop to poll for any of the following:
      a) while( pDesc->PktFlgLen | EMAC_DSC_FLAG_OWNER );
      b) while( EMAC_TX0CP != (Uint32) pDescTx );  /* EMAC_TX0CP should be zero before the packet is transmitted */
      c) tmpInt = EMAC_TXGOODFRAMES; while( EMAC_TXGOODFRAMES == tmpInt );

     

    ----------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use