Comparative research of USB movement speeds

[Paul Stoffregen], author of the Teensy series of microcontroller progression cards, recently discovered many projects that lead to massive LED arrays and observe the speed at which microcontroller progression cards can gain knowledge from a computer., of course, so your benchmarking efforts will surely be a success for anyone who makes plans for large-scale microcontroller projects.

The microcontrollers [Paul] verified included teensy 2.0, Teensy 3.0, Leonardo and Due Arduinos, and Fubarino Mini and Leaflabs Maple.They were verified on Linux (Ubuntu 12.04 Live CD), OSX Lion and Windows 7, all running on a MacBook Pro 2012.. If you don’t take a look at teensy 2.0 and 3.0, the verification effects were what you expected: faster devices can get more second-consistent bytes. However, when the Teensys were added to the mix, the effects were dramatically replaced.with the same microcontroller as the Leonardo Arduino, he was able to overcome all the cards of the Teensy 3.0.

[Paul] also made the effort to compare the other inconsistent formulas with those he was using.In the end, if you move many bytes at once, it doesn’t matter which formula you’re inconsistent with the ones you’re using.To move small amounts of data, you can use OS X.Windows is terrible for moving unique bytes; in a byte consistent with moving, Windows only takes care of four kbps.With the same task, Linux and OS X deal with approximately 53 and 860 (!) respectively.Kbps.

So here it is. If you build a massive LED array, use a Teensy 3.0 with a MacBook.Of course, [Paul] has done all the code for his open source reference tests, so feel free to reflect that experience.

Absolutely awesome! I’m updating an assignment to an ATMega32U4 and asked myself the same question.

With local USB support, I’m surprised Teensy kicks so many ass.Everything else is limited by having a TTL-USB series and possibly stuck at a bit rate of 115200.I love my teenage years.

The STM32 in Maple has at least one local USB stick, it is simply configured as a virtual series via libMaple and wirish.If you used USB functions directly, it would be faster.

In fact, everyone seems to have a USB drive in the MCU.

For reference: I controlled to approach massive transfers of 3 MB/s on an XMega.Of course, without any of that Arduino stuff.

Do you have 3 megabytes/second or 3 megabits/second?

3 megabytes/second would be quite surprising, since XMega chips have 12 Mbps USB which has a gross cable speed of 1.5 megabytes/sy a maximum theoretical movement rate of 1,216 megabytes/second with massive USB protocol overload (without adding more overdecbit depending on the knowledge of the bit padding algorithm).

3 megabits/second would equal 375,000 bytes/s.That’s pretty good, pretty much in the middle of the 6 cards I tried.

FWIW with my own stack (IMO LUFA is a disaster and ASF is even worse), I get a hair below 10 Mbps (1.1 MB/s) with massive Xmega readings, several notable queries from the host side, but no ping-pong on the MCU (empty packets, so there are no significant losses).

A great credit for USB CDC is its ease of use.With the exception of Win 8, it requires minimal manipulation with drivers, supports almost all programming languages, and has equipment to inspect, record, and manipulate data.

Once you’ve set up your library (using lufa, it’s quite simple), easy to use, and supports speeds that are sufficient for maximum applications.

Of course, if you have a wonderful task with traditional software on the host, gigantic amounts of knowledge and speed limitations, opt for a traditional device, but as far as I’m concerned, a serial interface remains the free language of home electronics.World.

Ignore the existing popular USB class, which has drivers, that’s stupid in my opinion.In my opinion, opting for a non-popular solution in case of protocols is a matter of last resort, not the result of the syndrome “not invented here, so it’s stupid.”

Can you percentage of the CDC-EEM code?

I’d also be interested in the CDC-EEM code, can you accentuate it?

if the stellaris only transfers to 11k, why does it attach the debug port to 1500,000 minicom?

minicom -D / dev / ttyACM0 -b1500000

It connects and transfers very well, I have not done any genuine comparative analysis.

Why don’t you do a comparative analysis? I published all the code, so you can do it easily.The debug port of this Launchpad card turns out to be connected via a hardware UART, so 1500,000 baud deserves to give a speed of 150,000 bytes/s, which would do at least faster than the 2 slower test cards.

So I just compiled and ran his program and they gave it to me.

Is that all I get?

If you are testing Stallaris or any other card that involves a hardware serial link between two chips, measure the frequency on pin 2 of the test. If you get a particular measurement on pin 2 (indicating the rate in ko/s received) of the reported speed on your PC (indicating the rate in ko/s transmitted), then the string buffer is exceeded.The ordinary series hardware does not necessarily have an end-to-end flow control like USB, so it is really vital to measure the speed in I put this code at the reference point to tilt pin 2 precisely for this reason, so that you can check the speed on both sides of the link.

You may not notice the main point of this regarding driving giant LED networks.Why would I have to do this via USB?For small screens, no problem. For giant screens, you would probably opt for an FPGA to convert the virtual video output from a PC/Mac to the LED array.Large format displays would likely require several separate update spaces to maintain video refresh.Rates. Maybe I’m just thinking about a different design goal than the original publication.

you may not need to use USB for giant berries, but others do.Switching from usb to fpga is a big step forward, which has a steep learning curve.

The ChipKit Max32 can USB speeds of up to 3Mbs, I use it to drive an RVB 2800 LED band

I would say that the HaD name is a bit misleading because comparative research is obviously only for USB CDC (virtual series) which is not designed for high-speed mass knowledge movement (and host operating formula comparisons are also serial only instead of USB usb supports other protocols (many of which support the LUFA USB library) that offer much higher movement speeds. If you need a giant LED matrix, using CDC is a bad implementation selection to start with in my humble opinion.Paul for publishing tests and results, as a component of Virtual Serial on USB, are very interesting.

The CDC series uses the USB mass motion protocol.In fact, after a configuration with control movements for serial settings, it only mapped I/O operations in USB mass motion operations.On Macintosh, the pilot does smart things to mix small writes together. Linux simply transmits its reads and writes in the form of mass protocol moves to the host controller chip.Who knows what Windows does to be so slow?

I don’t necessarily assume LUFA is fast. As long as no smart measurements are taken, no one really knows, Lufa has MUCH really complex code, which can be built conscientiously at its speed, or it can be simply syntactic sugar.which is optimized through the compiler, or can result in a lot of overhead.

You do some valuable problems, Paul.Although I still maintain that CDC is not the way to approve (for programs like LED array driving), because it can succeed over host and device overload by optimizing both sides depending on the extent of knowledge with CDC, it depends on the host’s operational formula for guessing the correct block length for you (which probably explains the large speed difference depending on the amount of knowledge you transfer). CDC also means that it runs the port of the operational formula series interface code that would possibly not be optimized for superior performance via USB and adds more code along the way to the IoT.I’d be interested in a LUFA CDC benchmark.

Its point is valid, that CDC is based on the driving force of the host.That’s why I took the trouble to test the other 3 hosts on 3 other write sizes.In fact, you can do more by creating a fully custom-designed solution on the host.and the device, which requires a lot of paints.But look how well Mac’s driving force handles small paper paints!If your knowledge is, of course, many small messages, I think you have to paint very, very hard to achieve something.that looks as good as CDC with Apple’s driving force with a Teensy3 and incredibly simple programming at Arduino.Again, if you’re targeting Windows, the driving force is so bad that you’ll actually want to make a lot of extra paints to use Bulky entries or expand a fully custom designed solution.

I would also like to see this reference point run in LUFA.Obviously, LUFA can’t run my Arduino sketches, but maybe I’ll just take my code to LUFA and check with the host appearance code I posted.

Teensy’s amazing!

I can help with this because I have found similar speeds with my ATMEL cards (most of the microcontrollers I tried involve USB 2.0 support but only put 12 Mbps into effect at full speed). You usually want to get a separate USB chip like a Cypress EZ -USB FX2 or FTDI FT2322H to get those convenient high-speed USB data speeds.

That said, I like virtual COM port deployments because they are integrated into the maximum operating systems and therefore do not require special drivers and can be integrated into virtually any software assignment that does not want those higher knowledge rates.

This Cypress chip is really awesome. In fact, there are many amazing USB chips on the market, but can they run Arduino sketches and Arduino libraries, and this reference shows the speed you get when programming Arduino in a simple way?

“This cypress chip” is the fx2 series – and how does Arduino look?PROBABLY NOT.

They are a beast of complexity of three heads, one of which is the USB 2.0 CONfigurable interface, the other is a programmable state device that can access the global external array up to 48 MHz, 16 bits (96 MB/s!) And the third: an “enhanced” 8051 microcontroller, von-neumanized, which will have to be programmed and then set up the other two “heads”.

To confuse things (MANY!), those chips have a pre-programmed firmware built in.Part of this firmware handles the USB question protocol component, and it’s quite simple to think that you have general control over it, while some of the original code is still running…However, this feature also makes those chips “non-brick”, as you can temporarily disconnect or short-circuit the eeprom chip when plugged in, to force the original firmware requirement.

There is an edition of this chip that can communicate about the voltage drop (down to 1.8V) that eliminates this feature, but it is only available on the BGA 56 pins (also be careful, the ifclk pin will still work at 3.3V). if it’s set to be clock output, I killed my PapilioOne that way).

The most productive thing you can get (assuming you put in effect a huge amount of cash) is approximately 30 to 40 MB/s supported.Also assuming you use one of the most productive Intel root hubs, on Linux, with the “fx2pipe” program written through Wolfgang Wieser (see triplespark.net).The Ztex SDK is basically put into effect in java, and uses libusb to talk, which is not as fast as going directly to the Linux kernel as fx2pipe does.

By the way, BW backup is complicated to manage: libusb drops the ball for four milliseconds or more occasionally, USB is controlled through the host, host speaks, and devices talk only when communicating with them.The host’s operating formula may not be altered at this time, knowledge will not lead anywhere.The four thousand five hundred are temporarily exhausted at four0 MB/s.

Cheap cy7c68013a cards can be purchased on eBay for around $10, but keep in mind that depending on the chip you get, you may find that the GPIF main access pins appear mysteriously disconnected and act as if they are still high.Fortunately, I want at least one fpga to drive the drink, I wanted to spend lost time from PC to lunch, and slave-fifteen mode still works perfectly.

Unfortunately, fx2pipe does not support ztex cards (yet …) because fx2 is also guilty of resetting and configuring the fpga, and fx2pipe hopes to be able to download its own firmware on the fx2 every time it starts.

That said, ztex cards are so reasonable (compared to looking for some other fpga dram fx2 card) that there’s not much to do with yours.I would have liked to have met them sooner; this is by far the easiest way to get a lot of bandwidth (at least up to about 30 MB/s).

Note that I’m talking about maximum hosts: PC bandwidth, but in the opposite direction there will be problems.

Cypress also manufactures a USB 3.0 “FX3” that will be interesting.The easiest way to get into one of those lately would be the BladeRF kickstarter.The FX3 is different: it is a full-blown ARM SoC, which can be had only in the BGA package and comes with a Linux-compatible SDK.

(PS, freeSoC also has an fx2, but is stressed only as a USB series converter, and the top bandwidth pins are not connected at all):

For those wondering why OSX beats Linux, leading developers are looking for it.

https://plus.google.com/111049168280159033135/posts/iGEcktD99NS

That’s because Mac buffers to send its small queries in the form of a larger packet.He plays a happy hell with latency for anything he tries to pretend is in real time.

You’re over-buffered.

However, when it comes to latency, I’ve also done a bit of benchmarking.These effects show that OS-X also achieves the lowest latency.Some of the first comparative analyses were published in neophob.com about 2 years ago and are discussed here in HaD.More recent tests have been discussed in the pjrc forums.I’ll probably redo those tests in my developing paint collection and post some other page in a month or two.

I know this sees a contradictory flow, just with buffering and also the lowest latency.The only explanation I can find is that Apple will have to have smart developers who care deeply about smart results.

I played with Teensy 2.0.You can perform massive USB transfers as fast as the full speed of the USB bus can handle, if you are willing to work directly with USB, write some meeting code and leave some time for it.genuine calculation.

With the new edition of Teensyduino 1.14, you can also have almost this speed only Serial.readBytes().No complicated programming is required.

HID paints are wonderful for a small amount of LEDs, like the 3 LEDs on your keyboard.It can work well for small to medium length LED cubes.But HID is suitable for moving giant amounts of knowledge, such as showing 30- or 60fps video-derived knowledge (e.g. Ambilight) in giant LED installations.

USB has four types of motion, with other bandwidth allocation methods through the host controller chip (on your PC or Mac).The HID protocol uses the type of USB motion “disruption”, which has guaranteed latency, but very limited bandwidth.receive more information about the four types of movements in the USB specification, or about a number of articles that others have written that are based on the specification with fewer technical explanations.

If you use “feautre reports”, HID traffic passes through the channel.This is slower than volume, but much faster than interrupting.On a bus at full speed, the volume is capable of performing approximately 19 image-consistent transactions, or around 1.2 million/s.The endpoint has an additional configuration and a binding phase that, depending on the type of host reader, can enter a compromised framework.Therefore, it has an accumulation of 2 ms in the movement time compared to the volume.Not so bad. On the other hand, the above volume drivers are otherwise optimized.They have a larger core-looking buffer, a somewhat different logic, and the hole between volume and construction.On high-speed devices, the hole is much larger because the volume uses packets 512 bytes in length and only 64 bytes in length.

With the code underneath and using 4k blocks, I got a speed of 2.0MB/s, more than 15 times faster.

#define USBSERIAL SerialUSB // Arduino Due, Maple

For true high-speed USB 2.0, you need 3 chips: a HiSpeed-compatible USB-FIFO chip, an FPGA, and a DRAM.

Use DRAM as a very deep fifteen. (ring seal, you’ll want to put the corresponding controller into effect in the FPGA).

Linux is like a guy who is in poor health for about a day about once or twice a year, Windows is like a guy who is random for about 6 months in a row without warning.The scenario is as if the control doesn’t notice, because the window manager continues to paint every year, and what it does is all that’s expected of anyone.Replace the year in this example with “8 ms difference” and that’s the scenario with USB 2.0 HiSpeed in a nut words The practical result is that you want at least 8 MB or more of an absolute buffer if you’re using Linux.

Deploying approximately 2 seconds of buffering will allow you to succeed in sustained 240 Mbps streams, forged until your disk is complete.(If you save it, I tried this until an 11 TB RAID array was completed, I used XFS.It took about 101 hours, I think). He’ll drive a little more, maybe 256 or more, but he may not be stable.You want excess BW to transparent the buffer between operational formula issues.

Oh, I want to use an Intel root hub; there may be some other root hub that I can follow, but most of the ones I’ve tried simply aren’t (if you’re curious, a ras-pi handles around 140 Mbps)., but only in memory …). I have not yet tested USB 3.0 root hubs ….

In the absence of a multi-MB buffer, you can maybe 20 MB/s for a few seconds at a time, if you’re lucky…

But seriously, if you are slightly interested in transferring or extracting knowledge via USB 2.0 to your project, the DSLogic kickstarter.

Note that you only want one twisted pair to move knowledge between FPGAs at much higher speeds, and there are two pairs in an extension header in DSLogic.

If you prefer a particular FPGA progression card to make high-speed transfers like this, ztex cards are your friends.If you don’t want that much speed, but still want an FPGA, then XuLA xess cards are my choice.

Good luck!

I just tested the sending speed (on an Ubuntu Linux laptop) via USB 3.0 and exceeded 1.2 MB/s!I intend to use it to generate genuine random knowledge at a fairly high speed.

I once made five megabits/s on a PIC16F1938 overclocked at 64Mhz.I can move the MFM synchronization knowledge of a floppy disk to approximately 2five0KB/s without any problem.I used a PL-2303 series chip to USB 🙂 The PL-2303 can succeed at 12Mbit according to the technical record, but the driving force unfortunately is limited to 6Mbit.I’m interested in the functionality of the PIC32MZ broadband USB.

Leave a Comment

Your email address will not be published. Required fields are marked *