Author Topic: looking for the fastest MPU with a built-in USB  (Read 12987 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
looking for the fastest MPU with a built-in USB
« on: December 30, 2014, 01:24:29 pm »
hi guys
i am toying with teensy v2 with has a built-in USB, achieving the maximum data transfer of 900Kbit/sec
i need something faster, definitively!

i'd like to transfer 5-6Mbit/sec

so, guys, what do you suggest me to aim for about the MPU choice ?
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: looking for the fastest MPU with a built-in USB
« Reply #1 on: December 30, 2014, 05:59:47 pm »
USB host? Device ?  data in or out?  Full speed? High speed ?
need more info.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #3 on: December 30, 2014, 06:37:40 pm »
USB host? Device ?  data in or out? 

like the Teensy-v2, so:
the MPU is USB device
the PC is USB host
it must transmit and receive


Full speed? High speed ?

good question, i need 5-6Mbit/sec
on the PC side i have both OHCI and EHCI

The 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.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #4 on: December 30, 2014, 06:47:05 pm »
About Connection type vs Transfer rate (Megabits/second)

  • Serial port is 0.92 Mbps
  • Standard parallel port is 0.92 Mbps
  • USB 1.0 is 1.5-12 Mbps
  • USB 2.0 Low Speed  is 1.5 Mbps
  • USB 2.0 full-speed is 12 Mbps <----------------------- this is enough for my purposes
  • USB 2.0 Hi-speed is 480 Mbps
  • IEEE 1934 (Firewire) is 420 Mbps
  • jtag is ? Mbps
  • swi is ? Mbps
« Last Edit: December 30, 2014, 11:12:14 pm by legacy »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #5 on: December 30, 2014, 06:50:24 pm »
This may help

it'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
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9018
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: looking for the fastest MPU with a built-in USB
« Reply #6 on: December 30, 2014, 07:18:02 pm »
The number of microcontrollers with built in USB are almost endless. PIC and ARM are two particularly popular ones.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #7 on: December 30, 2014, 08:25:01 pm »
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
 

Offline Rick60

  • Contributor
  • Posts: 18
  • Country: gb
Re: looking for the fastest MPU with a built-in USB
« Reply #8 on: December 30, 2014, 09:34:17 pm »
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 loss
A  Rpi is probably the cheapest root 

this site is a good read  [url=http://www.beyondlogic.org/usbnutshell/usb4.shtml]http://www.beyondlogic.org/usbnutshell/usb4.shtml [/url]
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: looking for the fastest MPU with a built-in USB
« Reply #9 on: December 30, 2014, 09:52:06 pm »
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 is http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=dm240011 and for the PIC32MX http://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.


 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #10 on: December 30, 2014, 10:58:30 pm »
Do you already have experience with a particular MCU family?

i am experienced with DSP, such as AnalogDevices/Blackfin and Motorola MC68332, they both do not have USB
i 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 900Kbps

my 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 project
i need an MPU, definitively  :D

There are many Starter Kits for PICs with USB, for a PIC24F there is http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=dm240011 and for the PIC32MX http://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.

good suggestions, let me try them :-+
« Last Edit: December 31, 2014, 07:50:14 am by legacy »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #11 on: December 30, 2014, 11:08:06 pm »
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 loss

unfortunately i can't accept potential data lost
i have to take care about that

you said 500Kbit/sec for FS/bulk

how could the FTDI 232 can claim 3Mbps with its usb-serial protocol ?
i am confused about that  :-//

it should be bulk-only, am i wrong ?
if so, how could it work ?
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: looking for the fastest MPU with a built-in USB
« Reply #12 on: December 30, 2014, 11:19:28 pm »
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 loss
A  Rpi is probably the cheapest root 

this site is a good read  [url=http://www.beyondlogic.org/usbnutshell/usb4.shtml]http://www.beyondlogic.org/usbnutshell/usb4.shtml [/url]

I 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.
« Last Edit: December 30, 2014, 11:23:37 pm by Howardlong »
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: looking for the fastest MPU with a built-in USB
« Reply #13 on: December 31, 2014, 12:43:33 am »
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 loss
A  Rpi is probably the cheapest root 

this site is a good read  [url=http://www.beyondlogic.org/usbnutshell/usb4.shtml]http://www.beyondlogic.org/usbnutshell/usb4.shtml [/url]

you can definitely do more than 500kbit/s with bulk, I've done +8Mbit/s with an ftdi245
many years ago before there was anything called highspeed

 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: looking for the fastest MPU with a built-in USB
« Reply #14 on: December 31, 2014, 12:45:15 am »
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, PIC18



Triple endpoint, PIC18

Edit: 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.
« Last Edit: December 31, 2014, 12:59:46 am by Howardlong »
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: looking for the fastest MPU with a built-in USB
« Reply #15 on: December 31, 2014, 07:09:08 am »
Did you see this: http://www.pjrc.com/teensy/benchmark_usb_serial_receive.html
Maybe you need to improve your PC-side software...
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #16 on: December 31, 2014, 07:51:12 am »
the limit of teensy is 1Mbps, not enough for me: i need 5-6 Mbps !!!
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: looking for the fastest MPU with a built-in USB
« Reply #17 on: December 31, 2014, 09:57:38 am »
The graph at the start of the article I linked says 1e6 BYTES/sec...  (but, not using windows with small WRITE sizes.)
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1640
  • Country: nl
Re: looking for the fastest MPU with a built-in USB
« Reply #18 on: December 31, 2014, 10:11:05 am »
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
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: sk
    • My site
Re: looking for the fastest MPU with a built-in USB
« Reply #19 on: December 31, 2014, 10:34:45 am »
Well, Xilinx ZYNQ is an MPU, FPGA and has a USB interface. Bit pricey though.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #20 on: December 31, 2014, 10:50:26 am »
The graph at the start of the article I linked says 1e6 BYTES/sec...  (but, not using windows with small WRITE sizes.)

wandering 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-v2

btw, i need to have linux support at the host side

 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #21 on: December 31, 2014, 10:51:56 am »
I've reached 800-900kB/s on the dangerous prototypes USB stack with a PIC24FJ64GB004 microcontroller

nice to know  :D
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: looking for the fastest MPU with a built-in USB
« Reply #22 on: December 31, 2014, 11:00:25 am »
also wandering what is inside a cheap Cam

e.g. if you have to transfer 640x480x16 bit, with 20 fps (frame per second)
you have a continuos data flow of 640x480x16x20 bit/sec

it 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 flow

0.5*640x480x16x20 bit/sec is 0.5 * 98Mbps X____X

so, which MPU they use inside such a Cam ?
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: looking for the fastest MPU with a built-in USB
« Reply #23 on: December 31, 2014, 11:03:42 am »
so, which MPU they use inside such a Cam ?
Most likely 8051 coupled to an ASIC with DMA controller.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: looking for the fastest MPU with a built-in USB
« Reply #24 on: December 31, 2014, 01:02:07 pm »
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 .
Full 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.

the limit of teensy is 1Mbps, not enough for me: i need 5-6 Mbps !!!
Sounds 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.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf