Red Pill or Blue Pill?

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
User avatar
cazimirb
Posts: 38
Joined: Wed Sep 16, 2015 1:58 pm
Location: Bucharest, Romania

Re: Red Pill or Blue Pill?

Post by cazimirb » Fri Oct 16, 2015 6:19 am

Rick Kimball wrote: I hadn't really looked at the voltage regulator on this board. * At first glance I thought it was a transistor *. I think people should replace the voltage regulator on "Blue Pill Board" (hereafter called) BPB. It seems to be under powered and leaves a lot to be desired.
-rick
AFAIK the LDO regulator on BPB is RT9193-33GB which has 300mA output capability...

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

Re: Red Pill or Blue Pill?

Post by ahull » Fri Oct 16, 2015 8:58 pm

cazimirb wrote:
Rick Kimball wrote: I hadn't really looked at the voltage regulator on this board. * At first glance I thought it was a transistor *. I think people should replace the voltage regulator on "Blue Pill Board" (hereafter called) BPB. It seems to be under powered and leaves a lot to be desired.
-rick
AFAIK the LDO regulator on BPB is RT9193-33GB which has 300mA output capability...
I think you are probably correct. This... http://www.richtek.com/en/Products/Line ... tor/RT9193
Matches well with this...
BluePillVREG.jpg
BluePillVREG.jpg (17.62 KiB) Viewed 1426 times
From the full bluepill schematic here...
BluePill-6-STM32F103C8T6原理图.pdf
(79.22 KiB) Downloaded 998 times
You would be advised to check your particular board though as there may well be different variants in the wild.
- Andy Hull -

jbforrer
Posts: 18
Joined: Thu Oct 08, 2015 5:44 am

Re: Red Pill or Blue Pill?

Post by jbforrer » Tue Oct 20, 2015 4:23 pm

Greetings,
Been following the Blue Pill USB saga ... have one of those with the 10K on PA12 as well.
I did the R10 (10K) resistor swap for a 1.5K but not much luck. Maybe the 3.3V supply on the Blue Pill?

Installed the "_PB13" bootloader via DFU & USB serial dongle, all OK. The Blue pill's LED starts off flashing fast after reset and after a while flashes at a slower rate.

XP does recognize something gets plugged into USB but unfortunately the XP driver install tells me the install program is not a valid .EXE, so no drivers gets installed and I'm stuck there. On Linux, nothing gets enumerated (nothing listed with "lusb"). This is with and without the 10K resistor swap. Made no difference at all on Linux (Mint distro).

I've been playing with similar arrangements using ATTiny85 (VUSB), also DigiSpark that implements similar hardware for their Arduino bootloader. There the USB lines are limited using 3.3V zeners, also use the 1.5K resistor on D+ to VCC. With that hardware there is no issue regarding driving USB low (maybe Atmel chips have more sink capacity on I/O pins?). DigiSpark's USB bootloader has an interesting enumerate workaround though... unlike Arduino modules, one do not connect the USB hardware until the Arduino downloader instructs one to plug it in. At that moment, and only then, the magic happens. DIgiSpark then enumerates and shows up as /dev/ttyACMx. Casually plugging DigiSpark into USB does not enumerate at all.

The USB feature is really not a big issue for me as the USB serial dongle works fine for me.

Thanks for all the efforts, all much appreciated.

Regards.

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

Re: Red Pill or Blue Pill?

Post by Rick Kimball » Tue Oct 20, 2015 5:05 pm

ahull wrote: From the full bluepill schematic here...
BluePill-6-STM32F103C8T6原理图.pdf
My blue pill has the USB pull up connected to the 3.3V instead of 5V. That schematic shows a 4k7 connected to the 5v. This must not be the schematic for my blue. Mine was originally 10k, and is wired to the 3.3v. I replaced it with a 1k5 and it just works now.
jbforrer wrote:Been following the Blue Pill USB saga ... have one of those with the 10K on PA12 as well.
I did the R10 (10K) resistor swap for a 1.5K but not much luck. Maybe the 3.3V supply on the Blue Pill?
Maybe yours is connected to the 5V jbforrer?

-rick
Last edited by Rick Kimball on Tue Oct 20, 2015 8:42 pm, edited 4 times in total.
-rick

jbforrer
Posts: 18
Joined: Thu Oct 08, 2015 5:44 am

Re: Red Pill or Blue Pill?

Post by jbforrer » Tue Oct 20, 2015 6:53 pm

Hi Rick,

Thanks for the suggestion ... indeed had my 1.5K connected to 5V and fixed now.
Shows up as "Bus 002 Device 006: ID 1eaf:0003" on Linux and Arduino download works fine too.

Regards.

jcw
Posts: 171
Joined: Mon Oct 26, 2015 8:16 am

Re: Red Pill or Blue Pill?

Post by jcw » Sun Nov 01, 2015 11:57 pm

I'm hereby cross-posting a link to a related topic about USB + BMP, at Roger's suggestion - well, I think this is the thread he was referring to anyway!

http://www.stm32duino.com/viewtopic.php?f=3&t=699

Would appreciate input on this, as it had me quite confused (which isn't that uncommon BTW :)

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

Re: Red Pill or Blue Pill?

Post by Rick Kimball » Mon Nov 02, 2015 12:10 am

jcw wrote:I'm hereby cross-posting a link to a related topic about USB + BMP, at Roger's suggestion - well, I think this is the thread he was referring to anyway!

http://www.stm32duino.com/viewtopic.php?f=3&t=699

Would appreciate input on this, as it had me quite confused (which isn't that uncommon BTW :)
This is really a question about specific platforms and how they deal with bootloaders and USB devices. BMP will normally not be affected unless the platform port disables the SWD pins (like the maple mini does .. or did not sure how it is setup now).
-rick
Last edited by Rick Kimball on Fri May 13, 2016 8:25 pm, edited 1 time in total.
-rick

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

Re: Red Pill or Blue Pill?

Post by RogerClark » Mon Nov 02, 2015 12:39 am

I guess the question is...

Do BMP users want to use the BMP virtual serial as Arduino "Serial" or do they want to use USB Serial though the USB connector on the target board

If we enable USB serial in the sketch, it becomes "Serial" so the UART 1 connection to the BMP would become Serial1

Hence any debug text would go to a different place

However if BMP users would be willing to plug in 2 connectors, thats fine.

Personally, If I was using the BMP, I'd want "Serial" to be via the BMP as it would mean that the comm port was always open, as the BMP USB connection is not reset ever time the sketch is loaded.

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

Re: Red Pill or Blue Pill?

Post by Rick Kimball » Mon Nov 02, 2015 12:44 am

RogerClark wrote:...
Personally, If I was using the BMP, I'd want "Serial" to be via the BMP as it would mean that the comm port was always open, as the BMP USB connection is not reset ever time the sketch is loaded.
That is how I use it.
-rick

jcw
Posts: 171
Joined: Mon Oct 26, 2015 8:16 am

Re: Red Pill or Blue Pill?

Post by jcw » Mon Nov 02, 2015 1:26 am

I guess it really depends on whether you see the BMP as a debugger or as a USB replacement.
I treat the BMP as a debugger, and expect it to be minimally invasive. A "probe", as the name says.

But the inability to use USB while debugging with the BMP is what actually threw me off.
When compiled with BMP, the code shrank by 5..6 KB, and using USBSerial gave me compiler errors.

Very confusing. Especially since it all worked when I was using an ST-Link, i.e. it included USB as expected.
Now try explaining to a newcomer what "Serial.print(123)" does. And how it depends on the "upload method" menu.
It seems to me that more people will start to use an ST-Link or a BMP once h/w debug becomes convenient.
Shouldn't the behaviour be consistent, at least between an ST-Link and a Black Magic Probe?

I rest my case, pedantically :) - part of the confusion is no doubt just me, but part of this is bound to trip up others.

-jcw

PS. Unfortunately, there also appears to be a re-build bug: switching to BMP first builds with USB, and then without, after an IDE restart. IOW, I see two different build results, without changing any settings - just an IDE restart. There seems to be an missed build dependency after a variant change, despite a message in the IDE to that effect.

Edit - fixed my comment above about trying to use USBserial.

Post Reply