cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
662 Views
Registered: ‎04-01-2019

How to configure USB Tx for consecutive transmit?

Hi there,

I encounter a problem when I use Zynq7000 SOC.

My application is described as following:

PC software is host, in normal mode it sends read/write command to device (product, motor drives), and drive replies with data in 1 string. As for in graph mode the PC software sends read command to drive and drive needs to reply with data in 64 consecutive string. And my problem happens at replying 64 consecutive string in graph mode. I configure the endpoint2 for IN (transmit) and endpoint3 for OUT (receive). I register xusb_cdc_ep2_irq_handler() as callback function for endpoint 2, but actually do nothing in this callback function even though I add the case XUSBPS_EP_EVENT_DATA_TX in xusb_cdc_ep2_irq_handler().

(Actually I don't know what to do for XUSBPS_EP_EVENT_DATA_TX  'cause I don't find example code configuring in that way, I just clear a software flag for the application)

I set breakpoints after calling XUsbPs_EpBufferSend(), get the function's return value abnormal with  XST_USB_NO_DESC_AVAILABLE code.  I tried a method to use different buffer to store data and then send the stored data into  EpBufferSend(), but the error code, XST_USB_NO_DESC_AVAILABLE, keeps happening. I also try to poll DMA hardware bit (XDMAPS_DBGSTATUS_OFFSET bit 0, is that right??) to check if DMA is busy or not, but It appears to be always busy even though I don't start the USB connection between PC software and drive.

Could any guys help me on this problem? Thanks in advance.

0 Kudos
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
510 Views
Registered: ‎01-21-2008

Hi @shaokan_huang,

 

Basically in baremetal USB drivers we do not support CDC class or ethernet gadject mode examples. We have only Mass storage USB device class example availble.

But still I can debug and let you know what could be issues in your attacehd code. Can you please send me the the SDK project to have look?  So I can debug and see where is the issue ar the CDD class berametal is having issues?

 

0 Kudos