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.

MUSB CRC Errors

Hello,

This is my setup:

* Beagleboard xM rev C

* NOT using Linux

* USB OTG used as peripheral only

* Using DMA

 

I am able to transmit data from the BB xM to the host (a PC), I am using the CDC class, however I get CRC Errors when using DMA (when not using DMA , no CRC errors are found but speed is decreased greatly).

Any advises on what to look for?

Also, sometimes the DMA transfer would hang, transfer is not finished and no interruption is generated.

Regards,

-Esaias

  • Are there any known issues (errata document)? I've got 2 documents from the Mentor IP (NDA signed) but I don't see any note regarding issues with it.

  • Esaias,

    Beagle xM has AM37x chip which has Mentor OTG controller core version 2.0. The USb DMA in core v2.0 has a limitation that the buffer should be on a four byte boundary. Typically all netwroking classes will send buffer which is not on a 4 byte boundary so DMA will be issue for such buffers.

    TI's PSP Linux driver is using system DMA for all 4 byte unaligned buffers to overcome this issue.

    In you case please check if the buffers are 4 byte aligned and if they aren't then you can either make then 4 byte align or use system DMA.

    Regards,

    Ajay

  • Ajay, 

     

    Thank you for your answer. I am checking that the address is 4 byte aligned

    -------------------------------------------

     

            while(bufAdd & 0x03)

            {

                g_CdcWriteBuffer++;

                bufAdd = (unsigned long) g_CdcWriteBuffer;

            }

    -------------------------------------------

    I don't think that is the issue.  I have checked and the address of the buffer is always 4 byte aligned (ends with 'C').

    Any other suggestions regarding the hang of DMA or CRC errors? By the way, right now I am only interested in the Tx mode (Peripheral to Host).