BluePill USB won't enumerate at all

Post here first, or if you can't find a relevant section!
msiddalingaiah
Posts: 5
Joined: Sat Dec 02, 2017 11:02 pm

BluePill USB won't enumerate at all

Post by msiddalingaiah » Sat Dec 02, 2017 11:57 pm

I got a handful of BluePills from eBay a while back, this set I believe:

https://www.ebay.com/itm/5X-STM32F103C8 ... 2f08316e42

I have had no problem getting them to work, but only programming through the serial port.
I followed directions on this wiki page to install the USB bootloader:

http://wiki.stm32duino.com/index.php?ti ... bootloader

The bootloader is loaded because the LED flashes as expected on power up.
R10 is 10k on these particular boards, so none of my computers see the USB out of the box.

I tried changing R10, removing R10 completely and using a PNP with 1.5k, even made a tiny PCB with PMOS switch as described in this post:

viewtopic.php?f=3&t=1059&hilit=USB+PMOS&start=10

No matter what I try, USB does not enumerate at all with Windows 7 or Mac.
All solder joints look good, the USB cable I'm using works with other devices.

What am I missing?

User avatar
RogerClark
Posts: 7538
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: BluePill USB won't enumerate at all

Post by RogerClark » Sun Dec 03, 2017 1:18 am

Most PCs seem to work even with the 10k pullup

Firstly did you select the correct board from the Boards menu

BluePill is Generic STM32

Not Maple mini

Run the windows device manager and take a look at what devices appear when you plug it in

If you load the latest version of bootloader from

https://github.com/rogerclarkmelbourne/ ... r/binaries

generic pc13 version

After installing the bootloader via serial (and setting boot0 back to LOW), the board should initially appear as a DFU device and then change to a serial device

Also, I presume you loaded the drivers (if you are running windows)

User avatar
ahull
Posts: 1672
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: BluePill USB won't enumerate at all

Post by ahull » Sun Dec 03, 2017 6:06 am

... also carefully check the soldering again on the USB connector. Poor soldering can result in intermittent connection or no connection between the PCB tracks and the connector. You will probably need some sort of "optical assistance" for this :D
- Andy Hull -

ag123
Posts: 824
Joined: Thu Jul 21, 2016 4:24 pm

Re: BluePill USB won't enumerate at all

Post by ag123 » Sun Dec 03, 2017 1:22 pm

one of those things i've encountered prior is a faulty usb cable, so check that too.
and there are some usb 3.0 hosts that for some reasons can't work or don't work, i'm not too certain about this though
the other thing actually is the *driver* especially on *windows*, if that isn't there or isn't appropriately configured it won't work

User avatar
Pito
Posts: 1691
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: BluePill USB won't enumerate at all

Post by Pito » Sun Dec 03, 2017 1:37 pm

In Win7 the drivers for BPill are in
../drivers/win/install_drivers.bat
Run the .bat and it installs them (dos windows appear, follow what they say).
10k is ok with BPill. USB 3.0 works here fine.

When connected to USB you will see "Maple DFU" in the Device manager (pops out as a new device).
Upload the sketch (sometimes it goes automatically, sometimes do press the reset button after you see in console it looks for DFU). After the upload you will see Maple COMx in the Device manager (serial ports). Set the COMx in your Arduino sketch properties for the BPill board connected.

For USB serial your sketch has to use "Serial". When you want Uart Serial you want "Serial1" or "Serial2".
Pukao Hats Cleaning Services Ltd.

User avatar
mrburnette
Posts: 2013
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: BluePill USB won't enumerate at all

Post by mrburnette » Sun Dec 03, 2017 5:41 pm

Yawn ..... Linux just works.

Ray

msiddalingaiah
Posts: 5
Joined: Sat Dec 02, 2017 11:02 pm

Re: BluePill USB won't enumerate at all

Post by msiddalingaiah » Sun Dec 03, 2017 6:30 pm

OK, you won't believe this (or maybe you will :ugeek:).

I suspected a wiring problem, so I checked all solder joints under super magnification, all looked good.
So then I started ohming things out, and it turns out that the USB cable I was using only supplies power!
D+ and D- are not wired through :x
I was using a cable that was lying around and my son reminded me that he got that with a USB battery backup, so it might only be useful for power.
Surprisingly, two other cables fail the same way, they were also "charging" cables, not "data" cables.

I located a USB cable that I had used with Raspberry Pi, so I know it communicates properly, and guess what?
It all works, even with the bogus 10k resistor!

I assumed that all USB cables are made equal, but apparently not!
I wasted countless hours due to a basic assumption about USB cables. Oh well...

One thing I have learned over the years is that if I see a problem and no one else is reporting a problem, it's probably something simple (possibly stupid) on my end.

Anyway, thanks for all the help, this is a great forum!

User avatar
Rick Kimball
Posts: 1066
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: BluePill USB won't enumerate at all

Post by Rick Kimball » Sun Dec 03, 2017 6:58 pm

The number of reasons something doesn't work are enumerable. We naively try to help people, but it is hopeless.

We are all alone. Only you can help you.
-rick

User avatar
RogerClark
Posts: 7538
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: BluePill USB won't enumerate at all

Post by RogerClark » Sun Dec 03, 2017 9:14 pm

There seem to be loads of different failure modes for USB.

The most “interesting” one last week, was where they had not connected the USB port on the BluePill at all.
They had only connected via a STLink debugger dongle

It’s hard to convince some people that their precise configuration works just fine, as often they seem to think it’s a bug in the core, or they have some unique combination of factors which needs a special change for them.
even though we literally have thousands of people using it on loads of different machines and OSes

Probably the biggest challenge is for Mac OSX users, as they are a small minority of the forum members, and also Apple don’t seem to care whether their OS works with a wide variety of USB devices, as they seem to now cater to a very main stream audience who they can milk extra income by getting them mainly to use Apple approved external hardware

Luckily at the moment, Windows 10 has not locked down the driver installation any harder than in Windows 7.

Linux is not necessarily a walk in the park either, as uDev rules can be problematic on some distros, and I known some people end up manually setting chmod 777 on the USB device(s)

msiddalingaiah
Posts: 5
Joined: Sat Dec 02, 2017 11:02 pm

Re: BluePill USB won't enumerate at all

Post by msiddalingaiah » Sun Dec 03, 2017 9:54 pm

I think part of the problem is a *potential* problem with USB on BluePills due to 10k, poor build quality etc., so that becomes a suspect.

Now that I have gone through the entire process, I was planning to document the exact steps in my github repo just for my own documentation purposes. My memory is not as good as it once was (actually it was never that good, I just didn't have as much to remember :lol:).

I don't mind adding more step by step detail on the STM32 wiki to reach a larger audience.

How do I create an account there?

Post Reply