looking for  the fastest MPU with a built-in USB - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 01:24:29 pm
content: hi guysi am toying with teensy v2 with has a built-in USB, achieving the maximum data transfer of 900Kbit/seci need something faster, definitively!i'd like to transfer 5-6Mbit/secso, guys, what do you suggest me to aim for about the MPU choice ?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 30, 2014, 05:59:47 pm
content: USB host? Device ? data in or out? Full speed? High speed ?need more info.

author: zapta
author_rank: Super Contributor
timestamp: December 30, 2014, 06:27:26 pm
content: This may helphttps://www.eevblog.com/forum/microcontrollers/looking-for-the-fastest-usb-chip/

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 06:37:40 pm
content: Quote from: mikeselectricstuff on December 30, 2014, 05:59:47 pmlike the Teensy-v2, so:the MPU is USB devicethe PC is USB hostit must transmit and receiveQuote from: mikeselectricstuff on December 30, 2014, 05:59:47 pmgood question, i need 5-6Mbit/secon the PC side i have both OHCI and EHCIThe USB 2.0 full speed is transferring data at the same speed as USB 1.1 full speed (12Mbps), but uses new protocols that allow for faster devices to be connected to the same hub or system on newer model computers in the market, so using USB 2.0 high speed devices transferring data at (480Mbps) is the fastest interface that a customer is expected to achieve.

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 06:47:05 pm
content: About Connection type vs Transfer rate (Megabits/second)Serial port is 0.92 MbpsStandard parallel port is 0.92 MbpsUSB 1.0 is 1.5-12 MbpsUSB 2.0 Low Speed is 1.5 MbpsUSB 2.0 full-speed is 12 Mbps <----------------------- this is enough for my purposesUSB 2.0 Hi-speed is 480 MbpsIEEE 1934 (Firewire) is 420 Mbpsjtag is ? Mbpsswi is ? Mbps

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 06:50:24 pm
content: Quote from: zapta on December 30, 2014, 06:27:26 pmit's a bit different, i am now looking for an MPU, not for a serial-usb chip to be used to transport informations out of/into an MPU/fpga

author: NiHaoMike
author_rank: Super Contributor
timestamp: December 30, 2014, 07:18:02 pm
content: The number of microcontrollers with built in USB are almost endless. PIC and ARM are two particularly popular ones.

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 08:25:01 pm
content: off course, i am asking a suggestion, which do you suggest me, with a good "get me started" material ?also, i do not want/can to spend a lot of money in the development system

author: Rick60
author_rank: Contributor
timestamp: December 30, 2014, 09:34:17 pm
content: You willl only make your required speed if you use Isochronous Transfers , as they allow upto 1023 bytes a packet , but you may lose data .Bulk transfers on FS are limited to 64bytes per sof (1mS) and only if the bus is free so 64*1000*8 = 500Kbit/s is the best you can do .you will need to find a micro with HS speed or accept potential data lossA Rpi is probably the cheapest rootthis site is a good read[url=http://www.beyondlogic.org/usbnutshell/usb4.shtml]http://www.beyondlogic.org/usbnutshell/usb4.shtml

author: Howardlong
author_rank: Super Contributor
timestamp: December 30, 2014, 09:52:06 pm
content: Do you already have experience with a particular MCU family? If so, I would choose something in that family: there are going to be plenty of concepts to learn without having to learn a new ecosystem.I do have a lot of experience with PIC24F and PIC32MX on USB, mostly with the low pin count devices such as the PIC24FJ32GB002 and PIC32MX230F064B. While the MLA (Microchip Library for Applications) USB stack is somewhat daunting, in general it's best to take some existing boilerplate code in their examples and modify that for your own purposes. Trying to write code from scratch might be an interesting academic exercise, but you'll probably be sorry you did.What I will suggest is that if you go PIC32 that you steer well clear of Microchip's Harmony framework and use the Legacy MLA instead. Harmony is new, buggy, doesn't perform very well, has no decent training material, and I doubt anyone has anything in production using it as a result, unless they've paid MCHP for some consultancy help. This pretty much precludes use of the newer PIC32MZ devices, which, by the way, have their own silicon problems.There are many Starter Kits for PICs with USB, for a PIC24F there ishttp://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=dm240011and for the PIC32MXhttp://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=dm320003-2.Both of these include onboard programmer/debuggers, so you don't need to shell out for that.Also note that changing chip within a family has its own excitement in that the pinouts will often be different and there may be minor and some not-so-minor differences in the support peripherals outside of the core. The oscillator blocks are probably the most important to watch out for, as well as the chips' config bits and pin multiplexing, but you should always check the other peripherals you'll be using. Also always at least be aware of what's in the errata for a given chip, it's far from rare to lose a day or two and then find it's in the errata.

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 10:58:30 pm
content: Quote from: Howardlong on December 30, 2014, 09:52:06 pmi am experienced with DSP, such as AnalogDevices/Blackfin and Motorola MC68332, they both do not have USBi am using the teensy-v2, which is an AVR8 ISA with a built-in usb (unfortunately usb1) and i am not able to go more tan 900Kbpsmy current working target is Atheros7 and 9, they are able to run linux, they have an MMU, but i can't use a SoC for this projecti need an MPU, definitivelyQuote from: Howardlong on December 30, 2014, 09:52:06 pmgood suggestions, let me try them

author: legacy
author_rank: Super Contributor
timestamp: December 30, 2014, 11:08:06 pm
content: Quote from: Rick60 on December 30, 2014, 09:34:17 pmunfortunately i can't accept potential data losti have to take care about thatyou said 500Kbit/sec for FS/bulkhow could the FTDI 232 can claim 3Mbps with its usb-serial protocol ?i am confused about thatit should be bulk-only, am i wrong ?if so, how could it work ?

author: Howardlong
author_rank: Super Contributor
timestamp: December 30, 2014, 11:19:28 pm
content: Quote from: Rick60 on December 30, 2014, 09:34:17 pmI am not sure that paints a true picture. Unlike isochronous transfers, bulk may have multiple packets per frame.I can achieve over 9.1Mbps (1176KBps) payload transfer rate in Full Speed using bulk endpoints from a PIC32MX running at 80MHz, but I do have to aggregate three endpoints. With a single endpoint it's over 6.8Mbps (890KBps).In addition, I am not sure you can connect an RPi as a USB device? Not only that, but the USB host stack on the RPi has its own features, particularly when connecting full speed devices due to its single transaction translator in the hub, and even more so if the end point is high bandwidth isochronous, as I have found to my cost, as the bus maxes out at about 720bytes/ms, but the USB FS spec supports 1023bytes/ms.

author: langwadt
author_rank: Super Contributor
timestamp: December 31, 2014, 12:43:33 am
content: Quote from: Rick60 on December 30, 2014, 09:34:17 pmyou can definitely do more than 500kbit/s with bulk, I've done +8Mbit/s with an ftdi245many years ago before there was anything called highspeed

author: Howardlong
author_rank: Super Contributor
timestamp: December 31, 2014, 12:45:15 am
content: If you need DSP, they do have some dsPICs with USB. I've not used the USB devices, other than in a starter kit. I don't think they're available as low pin count devices either.As a DSP, it has some interesting facets, but be aware that the dsPIC DSP core is fixed point and is basically a bolted on set of instructions and registers to the PIC24. These days you might find the PIC32 a better solution for certain DSP requirements as it can do a 32 bit x 32 bit MAC with a 64 bit result whereas the dsPIC can only do 17 bit by 17 bit MACs. The PIC32, being MIPS based, has freely available optimised DSP libraries.Right at the bottom end there are commodity PIC16 and PIC18 devices.I just tried the Bulk bandwidth test on a dsPIC33 and a PIC18, and they attained the similar performance to the PIC32. I would imagine that the PIC18's running out of grunt at that speed though, in the single endpoint test it dropped to 6.6Mbps.Single endpoint, PIC18Triple endpoint, PIC18Edit: Be careful with the cheaper low flash memory devices in each family, it's entirely feasible that the USB stack won't fit unless you have the paid-for optimising compiler. Been there, done that. I had the paid for compiler, but it made debugging a PITA having to have full optimisation on to make it fit.

author: westfw
author_rank: Super Contributor
timestamp: December 31, 2014, 07:09:08 am
content: Did you see this:http://www.pjrc.com/teensy/benchmark_usb_serial_receive.htmlMaybe you need to improve your PC-side software...

author: legacy
author_rank: Super Contributor
timestamp: December 31, 2014, 07:51:12 am
content: the limit of teensy is 1Mbps, not enough for me: i need 5-6 Mbps !!!

author: westfw
author_rank: Super Contributor
timestamp: December 31, 2014, 09:57:38 am
content: The graph at the start of the article I linked says 1e6 BYTES/sec... (but, not using windows with small WRITE sizes.)

author: hans
author_rank: Super Contributor
timestamp: December 31, 2014, 10:11:05 am
content: I've reached 800-900kB/s on the dangerous prototypes USB stack with a PIC24FJ64GB004 microcontroller. That was with high CPU usage, which that article talks about it's library stands out saving.So it's quite a respectable figure of 1MB/s to expect. Will probably depend on the PC host though, and how busy the USB hub/bus itself is with other devices.6Mbit/s is about 750kB/s

author: daqq
author_rank: Super Contributor
timestamp: December 31, 2014, 10:34:45 am
content: Well, Xilinx ZYNQ is an MPU, FPGA and has a USB interface. Bit pricey though.

author: legacy
author_rank: Super Contributor
timestamp: December 31, 2014, 10:50:26 am
content: Quote from: westfw on December 31, 2014, 09:57:38 amwandering HOW they made it so fast, i am not able to reproduce such a result !from my point of view i have a maximum data transfer of 1Mbps with Teensy-v2btw, i need to have linux support at the host side

author: legacy
author_rank: Super Contributor
timestamp: December 31, 2014, 10:51:56 am
content: Quote from: hans on December 31, 2014, 10:11:05 amnice to know

author: legacy
author_rank: Super Contributor
timestamp: December 31, 2014, 11:00:25 am
content: also wandering what is inside a cheap Came.g. if you have to transfer 640x480x16 bit, with 20 fps (frame per second)you have a continuos data flow of 640x480x16x20 bit/secit may be the Cam uses MPEG compression (i think cheaper Cam do that)but, assuming the a reduction up to the 50%, it is still a great data flow0.5*640x480x16x20 bit/sec is 0.5 * 98Mbps X____Xso, which MPU they use inside such a Cam ?

author: bktemp
author_rank: Super Contributor
timestamp: December 31, 2014, 11:03:42 am
content: Quote from: legacy on December 31, 2014, 11:00:25 amMost likely 8051 coupled to an ASIC with DMA controller.

author: andersm
author_rank: Super Contributor
timestamp: December 31, 2014, 01:02:07 pm
content: Quote from: Rick60 on December 30, 2014, 09:34:17 pmFull speed bulk transfer endpoints can transmit up to 64 bytes/transaction, but up to 19 transactions can be scheduled per frame, for a maximum of 64*19*1000*8 = 9.7Mbit/s.Quote from: legacy on December 31, 2014, 07:51:12 amSounds like software issues. The data must be ready to send when the host requests it, and the host must also keep a steady stream of requests coming. Both can be tricky to achieve.

author: legacy
author_rank: Super Contributor
timestamp: December 31, 2014, 01:17:12 pm
content: @andersmi have 2 sensors, each sensor is 128x128x8x20 bit per second, and the host should continuously acquire such a streamso it's a constant stream of 2x128x128x8x20 bps ~ 5Mbpsthe system load looks like an usb Cam

author: legacy
author_rank: Super Contributor
timestamp: December 31, 2014, 04:54:21 pm
content: alsothisdevice has 1Mbyte/sec through USB!It's a fast eprom emulator, wander what's inside

author: andersm
author_rank: Super Contributor
timestamp: December 31, 2014, 08:28:27 pm
content: If you don't have an USB packet analyzer/logger, try instrumenting your device USB stack to toggle a pin whenever a packet is sent. That way you can at least see the packet rate on an oscilloscope.To achieve high transfer speeds on the host side, there must always be an outstanding read request. If you use a single thread to read data, process it in some manner and then read some more, you will miss the 1ms scheduling window. Also doing any kind of operating system calls, like printing or writing to disk, can cause your reading thread to stall.

author: legacy
author_rank: Super Contributor
timestamp: January 21, 2015, 11:29:11 am
content: hereit is a pdf with a lot of information about USB devices pretty supported by FPGALink!

author: ehughes
author_rank: Frequent Contributor
timestamp: January 21, 2015, 07:30:10 pm
content: NXP LPC43xx series (I am using the LPC4357)It has 2 USB ports. USB0 is a high speed (480MBits/Sec). I have seen 6Megabytes/Sec writing to a Flash disk when implementing a MSC interface using there ROM drivers. Speed limitation was the disk interface/write speed.It is the fastest Cortex M4 on the market. (Also has a slave M0 core).A low cost way to Kick the tires is to purchase 2 NXP LPC-Link 2 Boards. One as the debugger and the other as the target board. The LPC-Link 2 has a LPC4370 device that you can use to evaluate. It is a RAM only device and is very fast (and is triple core!). The LPC-Link 2 are about $20 USD.The 4370 has decent DSP performance if needed. Running out of RAM is quick!

author: Howardlong
author_rank: Super Contributor
timestamp: January 23, 2015, 07:39:29 pm
content: Quote from: ehughes on January 21, 2015, 07:30:10 pmThe 4370 is a heck of a leap considering the OP's requirement, this is what I am using for a couple of projects at the moment. Triple cores, floating point, and possibly the world's most complicated peripherals, many unnecessarily so. Plus The small matter that it's only available BGA. It's a seriously good chip, but the learning curve is a bitch.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: January 24, 2015, 08:16:52 am
content: Check Cypress FX2 also - true USB HS (40+ MBytes/s), lots of code examples. Perhaps your sensors can be hooked directly to it's GPIF port.

author: legacy
author_rank: Super Contributor
timestamp: January 24, 2015, 03:47:35 pm
content: do you have any Cypress FX2 evaluation board to suggest me ?i need something @ 3.3V to be interfaced to a (spartan3/6) fpga

author: abyrvalg
author_rank: Frequent Contributor
timestamp: January 25, 2015, 04:28:23 am
content: I use local "made in Ukraine" boards very similar to this one:http://www.ebay.com/itm/Logic-Analyzer-EEPROM-CY7C68013A-56-EZ-USB-FX2LP-USB2-0-Develope-Board-Module-/380778239854?pt=AU_B_I_Electrical_Test_Equipment&hash=item58a826d76eJust search ebay for CY7C68013A - there are tons of such boards (ignore "logic analyzer", "Saleae" etc in descriptions - all of them can be treated as plain FX2 devboards).You'll need some 8051 compiler (I've tried Keil eval version, then moved to free SDCC) to build firmwares, Cypress SuiteUSB for quick testing (firmware load/program, generic USB send/receive), Cypress GPIF Designer (a visual tool to generate bus config source files).FX2 is 3.3V powered.On the other hand FTDI FT232H is a simpler option if you don't need FX2's flexibility (no firmware, just sync/async slave FIFO).

author: legacy
author_rank: Super Contributor
timestamp: January 25, 2015, 10:42:42 am
content: Quote from: abyrvalg on January 25, 2015, 04:28:23 amhow fast does it go ?also, i need something that could work on a SoC/mips linuxwandering if such a chip needs binary driver by FTDI, and in case …

author: Howardlong
author_rank: Super Contributor
timestamp: January 25, 2015, 11:43:13 am
content: One of the benefits of the FTDI way is that the cross-platform business is dealt with for you, they have drivers for the main desktop platforms. If you want a driver for iOS or something a little more esoteric, you're out of luck unless someone's hacked something together for you.However it's an additional chip, they're not especially cheap (important if you're manufacturing medium to high volumes) and you will still need to figure out your own application specific protocol on top of what FTDI provide.I spent some time interfacing both a PIC24 and PIC32 with a MIPs OpenWRT Linux based platform a couple of years ago. There were some features of the USB host driver in full speed that have probably been resolved now, to do with the estimated bandwidth calculation incorrectly rejecting the device. I did fix it, but it was deep in the USB host stack.I would recommend a LibUSB approach for cross platform at the speed you are requiring, that is ceetainly available on the host side for Linux and OSX (and Windows if you are willing to hack a bit). The 'Windows way' is WinUSB, which isn't the same as LibUSB although at a high level it's attempting to achieve the same thing, namely saving you from having to write your own device drivers.There are also examples in Microchip's MAL for LibUSB, I am sure other devices also have LibUSB examples.If your bandwidth requirements were smaller, I'd have no hesitation in recommending HID as your interface, but you're limited to about 500kbps (64 bytes per 1ms frame). The benefit of HID is that it requires no additional drivers, every OS includes HID these days.Just be aware of one limitation of full speed USB. Although it will match your bandwidth requirements, be aware that some host USB 2.0 controllers and hubs only have a single transaction translator (TT). This means that sometimes multiple full speed devices don't work very well as there is only one TT to handle the high speed translation from full speed. You can resolve this by placing a USB 2.0 hub (or USB 2.0 active extender) between the host and the full speed device, as they will have there own TT.If I were you, I'd pick a solution that ticks your boxes, and run with it. I may be wrong but it sounds like there may be some analysis paralysis going on here, an affliction I know only too well!

author: abyrvalg
author_rank: Frequent Contributor
timestamp: January 25, 2015, 04:46:42 pm
content: Oops, forgot about MIPS driver requirements. Then FX2 is a good option: you can either match some standard class like CDC or just implement your own protocol for use with libUSB.

author: David Spicer
author_rank: Contributor
timestamp: January 25, 2015, 10:40:42 pm
content: When wearing my consultants hat my first call for usb devices is cypress.com. They have a big range of parts, kits, useful downloads. All available mail order and reasonably priced. They used to use a 8051 cpu which is a truly horrible piece of 80's junk, but the newer stuff is arm which is nice.It won,t cost you anything to have a look at their site. Highly recommended. I have done several contract designs with their parts. Usb 1,2,3 all supported.Another option is xilinx, who do a core, nice soft core processor (microblaze) and free dev tools (webpack) the problem there is that it's a licensed core. And using xilinx licemsed cores forces you to enter flexlm hell. Licensing anything from xilinx is a truly ghastly experience. Waterboarding sounds preferable.aec-australia.

author: splin
author_rank: Frequent Contributor
timestamp: January 26, 2015, 03:05:39 pm
content: Quote from: abyrvalg on January 25, 2015, 04:28:23 amCrazy - $5 including postage for a complete board including a CY7C68013A which costs $10 (1 off) or $5.98 if you buy 2,500 from Digikey and even more from Mouser - plus lots more for postage/tax/handling if you're outside the USA.I see you can get them for around $2.5 each (10 off) from Aliexpress. Are they, and those on the cheap 'logic analyzer' boards likely to be counterfeit?

author: mazurov
author_rank: Frequent Contributor
timestamp: January 26, 2015, 05:00:46 pm
content: You can also use external USB controllers, like Maxim MAX3420 or 3421 (if you need host functionality). They will give you full speed USB if SPI in your micro is fast enough (they take 26 MHz max. SPI clock). PIC32 will give 20 MHz on SPI, this should be plenty to reach the speed you need.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: January 27, 2015, 11:40:15 am
content: splin, there are people around using Saleae clones, I have FX2-based cheap 3-in-1 Altera/Xilinx/Lattice cables - nobody had reported any problem so far. Even if those chips are fake copies, they must be high quality copies.

author: dadler
author_rank: Unknown
timestamp: January 27, 2015, 09:30:37 pm
content: Massive overkill: Sitara AM335x