+ Reply to Thread
Results 1 to 2 of 2

Thread: XMC4500. "DMA mode" for USB-device - it is workable?

  1. #1
    Intermediate Intermediate rst is on a distinguished road
    Join Date
    Nov 2016
    Location
    Latvia, Riga
    Posts
    23
    Points
    299.375

    XMC4500. "DMA mode" for USB-device - it is workable?

    I have a project with USB. My program transmits a stream of isochronous frames to the host. Frames length == 1023 bytes.
    In "Slave mode" of USB (GAHBCFG.DMAEn=0), everything works fine.
    But in "DMA mode" (GAHBCFG.DMAEn=1), at begin of transmission, only one short frame (171-172 bytes length) is transmitted (and was received at host's side). Then data transfer to FIFO stopped and host after that receives only zero length frames.
    In errata sheet for this MK (Rel. 1.5, 2018-07), I found a issue "USB_CM.005 DMA support for USB host mode operation". There it is advised not to use DMA. But there we are talking about USB-host. But I have USB-device.
    Does this advice apply also to USB-device or not?

    PS: Revision of my chip is "AC".

    PPS: When transfer to FIFO is stopped, contents of USB registers:
    GAHBCFG = 0x1A1
    DIEPCTL1 = 0x804483FF
    DIEPINT1 = 0x2010
    DIEPTSIZ1 = 0x803FF
    DIEPDMA1 = 0x20003F54
    DTXFSTS1 = 0x2C
    DIEPDMAB1 = 0x20003F54
    ?????? ?????? regs.png‎  
    Last edited by rst; Mar 18th, 2020 at 06:25 AM.

  2. #2
    Intermediate Intermediate rst is on a distinguished road
    Join Date
    Nov 2016
    Location
    Latvia, Riga
    Posts
    23
    Points
    299.375
    I am sorry - I found solve himself: Set reg. USB.GDFIFOCFG bits0...15 = 0; bits16...31 = start address inside FIFO RAM.
    Now USB-core works fine also in DMA mode.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


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 Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves 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.