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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
rst
Level 3
Level 3
First solution authored Welcome!
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
0 Likes
1 Reply
rst
Level 3
Level 3
First solution authored Welcome!
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.
0 Likes