USB
  Isochronous test patch

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Isochronous test patch
Tsuneo
Member
posted August 24, 2004 01:55 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Isochronous test patch

This test patch demonstrates the isochronous transfer on 'F32x. But don't expect much for the moment. Only the transfer protocol was replaced to isochronous on USB_INT_Cypress in this patch. After implementing the vendor request, USB_ADC is planned.

USB_ISO_TEST

This test program is based on USB_BULK_Cypress and USB_INT_Cypress. Please refer "USB_INT and USB_BULK on Cypress device driver"

USB_ISO_TEST (modified USB_INT_Cypress)
Firmware
Modified to test isochronous transfer.
Firmware protocol stack
  mainly based on USB_BULK "Last updated 18 JUN 2004"
 add details from USB_INT "Last updated 30 JAN 2004"
  GetDescriptor - String
  Suspend - Resume support
Firmware function
 derived form USB_INT "Last updated 30 JAN 2004"

Device driver
EZ-USB Development Tools V2.61.700
Please refer "USB_INT and USB_BULK on Cypress device driver" to download it.

This is the last message before my vacation. I'll be off until next Monday.. Bye!!

Tsuneo

PS
"USB_ISO_TEST.zip" was updated.
Next files were accidentally dropped from "Host Application Source" folder on previous zip.
3DMeterCtrl.cpp, 3DMeterCtrl.h, dynamicLED.cpp, DynamicLED.h, DynLED.h
Actually, as these files aren't modified, dragging them in from the original files will work.

My USB topics
How to increase HID_Example In/Out packet size?
FIFO read/write performance
256000 bytes/sec Isochronous transfer
Isochronous test patch
Multi-thread and Overlapped example for USB_INT Host Application
Vendor Requests test code
USB_INT and USB_BULK on Cypress device driver

[This message has been edited by Tsuneo (edited November 05, 2005).]

IP: Logged

Javier
New Member
posted August 31, 2004 04:48 PM     Click Here to See the Profile for Javier   Click Here to Email Javier     Edit/Delete Message
I am working with Iso-Transfer and this working well.

Wanted to know as I can optimize the data transfer?. In case of having 64 ready data to send them to the PC, and soon to return to count without lost.

At the moment I have working I modulate to 64 bytes by package.

IP: Logged

Tsuneo
Member
posted August 31, 2004 06:05 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Hi Javier,
This test code is simply made to clear several points about isochronous on 'F32x. I'm now coding continuous transfer with the endpoint3 to get 256000 byte/sec bandwidth as I promised to you about 2 weeks ago. I hope I can finish it this week end

Tsuneo

IP: Logged

Javier
New Member
posted September 01, 2004 11:27 AM     Click Here to See the Profile for Javier   Click Here to Email Javier     Edit/Delete Message
Thanks Mr. Tsuneo

I am working strong with test ISO, to obtain a transference of my data to the PC, without lost.

I am optimizing my codes to obtain it.

If you develop the code to transmit 256 kbytes/s with Endpoint 3 would be very good and I would like to see that speed.

Thanks to help us since it does.

IP: Logged

Javier
New Member
posted September 08, 2004 12:21 PM     Click Here to See the Profile for Javier   Click Here to Email Javier     Edit/Delete Message

Hello.

I am handling Iso Transfer, with packages of 64 bytes. With converter ADC of the F320 receipt signals of 10kHz and they see well when I make the graph, but if handling signals of smaller frequency these are seen very badly, they seem stairs with great steps (signals of 100 Hertz).

I believe that this happens because there is a time that is lost when the data are being transmitted USB way.

I believe that it is necessary to handle a block of memory for this, but since it could do it? if it is not thus, then as can be the solution to be able to transmit data in all the frequencies up to 10 kHz.?

IP: Logged

Tsuneo
Member
posted September 09, 2004 01:32 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Hi Javier,

a) Firmware:
To buffer the data, prepare two buffers of the max packet payload size. One buffer will do, but using two buffers is reliable. In your case, two 64 bytes buffers will fit in pdata memory area.
In ADC ISR, store the data to one of the buffer, and raise a flag when the buffer becomes full. When one buffer becomes full, switch to another buffer to fill.
In mainloop, poll the buffer-full flag. Detecting this flag up, transfer the data from current buffer to FIFO and set INPRDY. And down the flag.
Data buffering will be also useful especially for error correction.

I'm now working on direct FIFO writing method. In this method, the ADC data is directly pushed into the FIFO without buffering every time the ADC ends conversion. And when the FIFO becomes full, INPRDY bit is set to send the packet.

Both method, bufferd or direct, will result full or empty packet if the transfer rate is faster than the data rate produced by sampling. USB engine sends empty (zero-length) packet if the FIFO is not ready when Isochronous IN transaction occurs. Double buffering is necessary for these schema.

Direct FIFO method has the advantage on speed and memory usage. However, the weak point of this method is that FIFO access is spread out everywhere. As both FIFO access and USB operation, such as vendor request, use USB registers, they interfere mutually. I believe FIFO access method should be improved if SiLabs plans a revised version of USB MCU.

b) Host application:
If your program requests the transfer packet by packet, not as a block, it may drop packets occasionally. Request as large block as possible, if your program calls DeviceIoControl() synchronously. Or use thread or asynchronous (overlapped) call. As for thread and overlapped example, please refer "Multi-thread and Overlapped example for USB_INT Host Application"

Anyway, the dificulty on Isochronous lies on Host application than firmware to get high bandwidth continuously. I spend almost all of my spare time to poke about the host application these days.

Tsuneo

[This message has been edited by Tsuneo (edited September 09, 2004).]

IP: Logged

Javier
New Member
posted September 09, 2004 03:16 PM     Click Here to See the Profile for Javier   Click Here to Email Javier     Edit/Delete Message
In this message I cannot see my question, nor the answer that occurred the same one are messages 4 and 5 of Isochronous test patch

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b