This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC1769 USB DMA Mode

Hi,
I am currently using IN EP3 of the LPC1769 to realize Isochronous transactions to the Host. I have configured the this endpoint in the DMA mode

 LPC_USB->EpDMAEn   = 0x80;

I enable the DMA on the EP when I receive the Set Interface command from the Host. However, I see that the EpDMAEn does not change its value to 0x80 as desired (this could probably be because the register is Write Only, but I am not sure).
Please can someone let me know the conditions under which the DMA mode for the EP would get disabled?

In order to get around this problem I write to the above register everytime I create a DMA Descriptor. Is this a good method? Many time we end up loosing bytes of information on the host but I am not sure if it is actually because of this.

Any help in this regard would be much appreciated.

Thanks very much.

Regards,
Shaunak

Parents
  • What is the size of the dummy packet?
    Does it match to wMaxPacketSize of the isoc endpoint?
    If so, you have a simple workaround.

    Increase wMaxPacketSize by one.
    And then, the image packet has the size of 642 bytes, and dummy packet is 643.
    Your PC application easily identifies dummy packet by its size.

    Tsuneo

Reply
  • What is the size of the dummy packet?
    Does it match to wMaxPacketSize of the isoc endpoint?
    If so, you have a simple workaround.

    Increase wMaxPacketSize by one.
    And then, the image packet has the size of 642 bytes, and dummy packet is 643.
    Your PC application easily identifies dummy packet by its size.

    Tsuneo

Children
  • Hi Tsuneo,

    Thank you very much for your reply.
    All packets transferred have the size wMaxPacketSize.But we are not transmitting an dummy packet. I think this corruption of data is happening at the USB Host Controller provided along with the Win CE BSP (we do not have the source code to this, only link to the libraries).
    The buffer passed, to the APIs that initiate an Isochronous Read, gets 0xAA inserted into it when it is returned to the calling function.

    Please can you let me know your thoughts?

    Thanks very much.

    Regards,
    Shaunak

  • Hi Tsuneo,

    I had another question regarding the LPC1769 DMA mode.

    If the two EP buffers of the isochronous EP have been filled due to 2 DMA bursts and the host now starts to read the data from the 1st buffer. If a DMA burst is initiated at this moment, will the data being transmitted to the Host be corrupted or replaced?

    Thanks very much.

    Regards,
    Shaunak