Since I'm worried about the future of AVR, I've been looking into software USB for ARM cortex-M0/M0+ that is similar to V-USB. All I've found is a port of LUFA, which is for MCUs with internal USB hardware.

Now I know there are Cortex-M0/M0+ controllers that do have USB hardware, although I'm looking at using the smallest lowest pin-count I possibly can which usually don't have USB hardware. I know some of these tiny controllers will have USB hardware but they are typically in a WLCSP package which have small spacing between the pads which I cannot work with. This is why I'm looking for a software implementation.

Is there a software only implementation of USB for ARM-M0/M0+?

note: by software, I mean firmware but it seems code-only implementations of hardware peripherals are usually referred to by software.

note 2: Please don't suggest any specific products. The question isn't about an inability to find small controllers with USB, its about the lack of a software implementation of USB for ARM much like V-USB.

  • 1
    \$\begingroup\$ Please stop commenting with links recommending specific products. This question isn't about that and it is off topic for this stack exchange \$\endgroup\$ – Funkyguy Jul 3 '16 at 21:12
  • 1
    \$\begingroup\$ @pipe they aren't ARM. Read the question \$\endgroup\$ – Funkyguy Jul 3 '16 at 21:21
  • 3
    \$\begingroup\$ @Funkyguy I did read your question. All of it, in fact. Not just the title. You have a problem which you're trying to solve in a way that's not the most rational. Expect comments and answers trying to solve the root issue. \$\endgroup\$ – pipe Jul 3 '16 at 21:25
  • 1
    \$\begingroup\$ You are looking for something like LemcUSB. GNU GPL 3.0 is ok? I can expect next question about porting Micronucleus to ARM :) \$\endgroup\$ – kimstik Dec 2 '16 at 17:44
  • 1
    \$\begingroup\$ there's quite a few libraries that have popped up: embedds.com/bit-banging-usb-on-msp430 hackaday.com/2014/03/22/bitbanging-usb-on-low-power-arms \$\endgroup\$ – lkcl Oct 13 '17 at 9:42

Here's a new M0+ implementation comparable to V-USB https://github.com/xobs/grainuum

Interesting 33c3 video explaining as well: https://www.youtube.com/watch?v=G_tdJ9Lu7Zk

Still pretty fresh and prob not as stable as V-USB but sounds promising. Curious how vital the 2 stage pipeline of the M0+ really is as would be nice to implement this on M0.

Doesn't sound like he's so tight that he can't afford one more cycle with the 3 stage pipeline. I think the biggest issue will be M0's lack of single cycle I/O ports which is an optional feature of the M0+. But he makes it sound like the pipeline is the real benefit of M0+.


It is not really too feasible. Because today many microcontrollers are fabricated for 2.5V down to 1.8V operating ranges. The software implementation through simple I/O toggling will not handle the high speed differential operation without a dedicated PHY on silicon (with special tranceivers). V-USB was working on AVR because it used on microcontrollers operating on 5V. There are no many of them on modern designs.

  • 2
    \$\begingroup\$ V-USB required the MCU to be running at 3.3V, or a crude zener diode based level shifter to be used if it was running at 5V. \$\endgroup\$ – Tom Carpenter Jul 4 '16 at 0:34
  • \$\begingroup\$ Yes, you are right, and I have confirmed Cortex M0 operating at 3.3V. So for that models it still totally feasible. Someone can port V-USB to ARM. \$\endgroup\$ – Jairo Andres Velasco Romero Jul 4 '16 at 17:55

protected by Dave Tweed Oct 13 '17 at 13:05

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.