Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20711 Discussions

USB DMA transfter stopped for Altera Cyclone V.

Altera_Forum
Honored Contributor II
949 Views

Hello experts, 

 

I am a USB developer. I am using the Altera Cyclone V. 

 

When I start a DMA bulk transfter, sometimes USB stopped to transfter the whole package. I have debugged for a long time. That looks like fifo issue. 

 

If fulsh all rx fifo and tx fifo before DMA transfter, it will works.  

 

Does anybody know how to config the three registers GRXFSIZ, GNPTXFSIZ and HPTXFSIZ ? And how to config other fifo registers? 

 

 

Thanks, 

Daniel
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
212 Views

I'm not a USB expert but I looked up these registers and this is what I found: 

 

GRXFSIZ (RX FIFO Size Register) --> RX FIFO depth[13:0] 

GNPTXFSIZ (Non-periodic TX FIFO Size Register) -->TX FIFO Size 0 [29:16] : TX FIFO start address 0 [13:0] *** you should set the TX FIFO start address 0 to be RX FIFO depth *** 

HPTXFSIZ (Periodic TX FIFO Size Register) --> TX FIFO Size 1 [29:16] : TX FIFO start address 1 [14:0] *** you should set the TX FIFO start address 1 to RX FIFO depth + TX FIFO Size 0 *** 

 

So essentially you are setting up the size and start address of three FIFOs inside the internal SRAM in the USB core. At offset 0 in the SRAM is the RX FIFO, followed by the non-periodic tx FIFO, followed by the period TX FIFO. 

 

I recommend opening a service request and copying the link to this post into it: http://www.altera.com/mysupport Ask for additional information on the HPS USB core and we should be able to provide you with that information.
0 Kudos
Reply