The Full Speed USB actual Speed?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The Full Speed USB actual Speed?

4,721 Views
lamtsingleung
Contributor I

I know the KL2 series is using USB 2.0 Full Speed, and the ideal transmit speed is 12 Mbps.


But I wonder what the actual data speed it can be when MCU read the data from a NAND FLASH and send it to a PC.


It's quite important to our design because we have a large amount of data to send. Do anyone done any relative test?

Labels (2)
Tags (2)
0 Kudos
8 Replies

1,979 Views
CarlosCasillas
NXP Employee
NXP Employee

Hello Lam

The 12 Mbps is the bit rate, but actual throughput is less. The performance varies according with the Class, and if the MCU is used as Host or as Device, and depends of the used software (USBstack). Each transfer type (Interrupt, Bulk, Isochronous) have a maximum packet size, and number of transfers and transactions in a USB frame may vary depending of MCU load, but the frame rate is also constant (each 1ms).
Therefore, as Jim Donelson has commented, it is recommended to test the actual throughput in your specific application.

Hope this information will be useful for you.
Best regards!

/Carlos

0 Kudos

1,979 Views
lamtsingleung
Contributor I

Hi Carlos,

Thank for answering my question,


Now I measured  the data rate in PC and get a number of 3.8 Mbps. It's far from 12 Mbps. So I wonder how can I get a higher speed.


I use MCU as a Device and  I choose CDC class.Will MSC class or others transfer faster than CDC?

I tested the KL25Z USB speed using  APl given by freescale example code,which send data API is USB_Class_CDC_Interface_DIC_Send_Data(). I do not see any relate parameter such as packet size, frame rate introduce in the API user manual. So how can I modify those parameter and get a higher speed?



0 Kudos

1,979 Views
mjbcswitzerland
Specialist V

Hi

Using bulk endpoints (as CDC and MSD will) and no USB hub the FS USB can achieve a maximum throughput of 9.7MBit/s due to overhead in the USB protocoll itself. [MSD has additional MSD protocoll overhead and so the absolute highest throughput would probably be acheived with CDC class]

The FS device in the Kinetis has a high interrupt overhead and the software design must also be correct to achieve this (making sure that the data for transfer is ready, in the correct buffer descriptor, when each packet is requested by the host and using the controller's double-buffering capability).

Each time the packet deadline is missed the USB device will send a NAK and it will miss out on a transmission slot, reducing the throughput equivalently.

You need to measure the amount of NAKs that the controller is sending and identify where the bottle-neck is when there are phases with then since it is invariably in the software design since the USB device controller can achieve 9.7MBit/s as long as the SW prepares the data correctly.

Interrupt overhead is high and the KL25 is of course not as fast as a K70 (etc.) so its (overall) SW design may need to be more optimised to get the top end.

Regards

Mark

0 Kudos

1,979 Views
JimDon
Senior Contributor III

You need to test the for your own application. I doubt you will get 12 Mbps or really anything close.

Also wondering why you would send data from nand flash? Do you mean a USB stick?

1,978 Views
lamtsingleung
Contributor I

I used MSP430 as my design's MCU first. It also declare to support USB full Speed, but the actually speed is just 1.8 Mbps, far from 12 Mbps. So I wonder if KL2 series have the same problem.

My circuit collects data from a ADC and then saves it in a Micron NAND FLASH chip. So I will have to transport data from a NAND FLASH to a PC through the USB.

0 Kudos

1,978 Views
Monica
Senior Contributor III

Lam,

how is the project going?

Please keep us posted!

Best regards! :smileyhappy:

0 Kudos

1,978 Views
lamtsingleung
Contributor I

Hi Monica,

I modified the example code named USB_CDC,given by Freescale USB stack v4.03. Run the code on the Freedom KL25Z Board, and let the  KL25 sending ASCII code constantly using USB_Class_CDC_Interface_DIC_Send_Data(). I mearsured the data rate on PC and get about 3.8 Mbps. It is far from 12 Mbps. How can I get faster?

0 Kudos

1,978 Views
Ahmedahmed
Contributor II
How did you modify the function to send data constantl?
0 Kudos