Author Topic: USB application with Texas C5515 DSP  (Read 23590 times)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB application with Texas C5515 DSP
« Reply #15 on: April 05, 2012, 10:09:51 am »
Place it in the INF file. See the example INF and readme.

Jan

yusufs

  • Member
  • ***
  • Posts: 14
Re: USB application with Texas C5515 DSP
« Reply #16 on: April 19, 2012, 01:57:05 am »
Dear Jan,

Since the last time I posted here, I proceed someway. I installed libusb drivers to my device, the enumeration works fine. Also the device is able to receive and read a 64bytes data packet from the host application. However, I could not send any data to PC. The transfer fails in host application. In my code, when a TX interrupt comes to controller it loads data packet to related FIFO registers. But the packet contains only the data I want to send, in other words there is not any Sync   PID   Data   CRC16 EOP information in the packet. Does that cause the problem? Or what can cause this problem? Thanks in advance.

Best Regards...
Yusuf

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB application with Texas C5515 DSP
« Reply #17 on: April 19, 2012, 10:35:43 am »
Generally the controller hardware handles the low-level error checking and packet formatting.

Use a protocol analyzer or whatever debugging tools you have to find out what is happening on the bus.

Is the host sending the data?

If so, is the device NAKing it, ACKing but ignoring the data, not responding at all?

The answers to these will help you isolate the problem.

Jan

yusufs

  • Member
  • ***
  • Posts: 14
Re: USB application with Texas C5515 DSP
« Reply #18 on: April 19, 2012, 11:13:31 am »
I am using USBLyzer analyzer program. As I can see from the screenshot attached here, there are two unsuccessful IN transfer attempts.In status bar "Unsuccessful(Stall PID)" is written. I think, device tries to send packet, bu it is not approved by the host.

Thank for all help.

Yusuf

[attachment deleted by admin]

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB application with Texas C5515 DSP
« Reply #19 on: April 19, 2012, 11:31:58 am »
Stall is the handshake code returned by the device.

Change your firmware so the endpoint sends data in response to IN token packets instead of stalling.

Jan

yusufs

  • Member
  • ***
  • Posts: 14
Re: USB application with Texas C5515 DSP
« Reply #20 on: April 27, 2012, 05:03:22 am »
Dear Jan Axelson,
I want to thank you due to your help and answers to my questions. Since a few days ago, my device is able to transmit data to PC in any packet size that I want to use and in high speed mode. Thanks for all information you have provided here and into your book.
Best wishes...
Yusuf Sekman

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB application with Texas C5515 DSP
« Reply #21 on: April 27, 2012, 09:57:59 am »
Excellent! I'm glad you got it working.

Jan

yusufs

  • Member
  • ***
  • Posts: 14
Re: USB application with Texas C5515 DSP
« Reply #22 on: May 07, 2012, 04:03:32 am »
Hello again,
I've set packet size to 512 bytes in high speed interrupt mode. As I am tracing my device transferring data to PC by using USBlyzer, I see that the period between two packet transaction is nearly 500-600us, indeed I expect 125 us to pass between two packet transaction according to high speed usb specification. Do you have any clue about how can I modify my device code or host software in order to decrease microframe interval to 125us? Thanks in advance.
Best of all.
Yusuf

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB application with Texas C5515 DSP
« Reply #23 on: May 07, 2012, 04:20:54 pm »
the host OS adds overhead for each call to send or retrieve reports.

For device-to-host reports, increase the size of the ReadFile buffer. ReadFile returns as many available reports as will fit in the buffer.

For both directions, defining longer, multi-packet reports is more efficient.

Jan

yusufs

  • Member
  • ***
  • Posts: 14
Re: USB application with Texas C5515 DSP
« Reply #24 on: September 25, 2012, 09:08:52 am »
Hello Jan,

As we are trying to use our usb device that sends continuous data to PC in interrupt mode, we realized that the device works as expected on USB 2.0 port of PC. However, when we plug it into USB 3.0 port, the speed of data transfer decreases a lot. libusb driver installation or data transfer do not fail in usb 3.0 port, but only transfer speed decreases(normally it takes 4ms for transferring each 64 byte packet as host program defines as 4ms. It increases to 32ms on usb 3.0 port of PC.) What do you think about the problem? Thanks in advance.
Best regards..

Yusuf

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB application with Texas C5515 DSP
« Reply #25 on: September 25, 2012, 11:11:04 am »
Does increasing the size of the ReadFile buffer help? If so, the problem is likely in the overhead of calling ReadFile. I don't know why it would be worse on a USB 3.0 port.