Blue pill's Bootloader - what's goin' on .. ???

Bootloader for boards that don't have the addition hardware found on the Maple mini, which resets the USB
Post Reply
bianchifan
Posts: 77
Joined: Sun Oct 18, 2015 1:27 pm
Location: W'tal, Germany

Blue pill's Bootloader - what's goin' on .. ???

Post by bianchifan » Tue Jan 10, 2017 10:18 am

Uploading sketches via ST-Link is still easy goin :)
Using bootloader instead still same old ... :((

From time to time - maybe 20-30% - the loader doesn't find its beliked DFU although the port is still visible/listed
z1.jpg
z1.jpg (94.03 KiB) Viewed 481 times
EVERY time DFU is found there is a reset problem at the end.
z2.jpg
z2.jpg (94.73 KiB) Viewed 481 times
The system enumerates up to 4 times until the connection becomes stable.
Synchronizing a terminal is horrible, only practical way is a restart of IDE's serial monitor after the connection became stable.

stevestrong
Posts: 1152
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Blue pill's Bootloader - what's goin' on .. ???

Post by stevestrong » Tue Jan 10, 2017 10:43 am

Which OS?

bianchifan
Posts: 77
Joined: Sun Oct 18, 2015 1:27 pm
Location: W'tal, Germany

Re: Blue pill's Bootloader - what's goin' on .. ???

Post by bianchifan » Tue Jan 10, 2017 11:03 am

stevestrong wrote:Which OS?
Win7-64 (on Ubuntu something went wrong on updating Arduino 1.8 :( )

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

Re: Blue pill's Bootloader - what's goin' on .. ???

Post by Pito » Tue Jan 10, 2017 12:08 pm

The resetting error at the end should be ok people say. I saw it when in "good period" and "bad period" too.
I have periods where the upload works 99% fine, and periods where I have to press reset during upload all the time (with a correct USB clock). Still thinking what could be the cause for such changes in the DFU mood. Win7-64 here, latest hw, USB3.0, USB2.0.
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 1152
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Blue pill's Bootloader - what's goin' on .. ???

Post by stevestrong » Tue Jan 10, 2017 12:41 pm

I had problems mostly when the executed code blocks the on-chip USB serial to work, i.e. nested ISRs.
But most of the time is the Java running in the Win10 background which becomes unstable...

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

Re: Blue pill's Bootloader - what's goin' on .. ???

Post by mrburnette » Tue Jan 10, 2017 1:13 pm

Even the Maple Mini will fail on Windows once-in-a-while. While I have not been on Windows in a year, my very well tuned Win8.1 box used to fail perhaps 4 or 5 time per 100 (guess ... I did not count every failure.) Just when you though everything was perfect - poof, an upload FU.

Point is, it is not a Red_Pill, Blue_Pill, Black_Pill, or Maple Mini issue ... it is the technology. If you must have 100% upload reliability, you are using the wrong technology. While Linux hosting is better IMO than Windows 8/10, it is still not perfect; an occasional hiccup will happen.

My overall recommendation:
--> Develop and test on a Maple Mini, the de facto standard
--> Migrate/Port to the Red/Blue/Black boards for inexpensive projects and deployments where having a bootloader is of no value

Ray

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

Re: Blue pill's Bootloader - what's goin' on .. ???

Post by RogerClark » Tue Jan 10, 2017 9:18 pm

The way the bootloader and Core reset the USB is basically a hack that we had to use because the Blue Pill etc do not have the necessary additional hardware to reset the USB correctly.
This hack, breaches the USB spec, so is not guaranteed to work.

The Blue Pill also has another design fault as it uses a 10k USB pull up resistor, but the USB spec requires 1.5k

The Maple mini has the additional USB reset hardware, and uses the correct pull up, and is therefore far more reliable.


I use all sorts of MCUs for work, and find even expensive commercial SWD programmers sometimes fail to upload, and I am forced to powercycle the MCU, and try again.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest