Blue pill, USB serial inactive after loading code, OK after reset

jaromir
Sun May 01, 2016 6:26 pm
Hi guys,
I’m playing with generic blue pill with STM32F103C8, loading binary via st-link, on arduino IDE 1.65-r5, running on Linux Mint 17.2, 64bit.
Currently, using this simple source:
/ the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin PC13 as an output.
pinMode(PC13, OUTPUT);
Serial.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
Serial.println("test");
digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(900); // wait for a second
digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
}


Slammer
Sun May 01, 2016 8:22 pm
One resistor 1K5 connected between 3.3V and PA12 is needed for correct enumeration of USB. In most cases this is enough. You don’t have to remove the 10K resistor.

WereCatf
Mon May 02, 2016 2:27 am
Slammer wrote:One resistor 1K5 connected between 3.3V and PA12 is needed for correct enumeration of USB. In most cases this is enough. You don’t have to remove the 10K resistor.

jaromir
Tue May 03, 2016 1:08 pm
I tried the blue pill board on different computer with Win7 and it behaves more expected – I mean, it re-enumerates after loading code, but the shitty windows CDC driver makes work with CDC USB as unpleasant as usual. Not sure what makes difference here, if the OS or USB hardware.
I’ll try to modify the board for 1k5 resistor or use transistor to switch pull-up to see if it makes any difference.

mrburnette
Tue May 03, 2016 5:21 pm
jaromir wrote:I tried the blue pill board on different computer with Win7 and it behaves more expected – I mean, it re-enumerates after loading code, but the shitty windows CDC driver makes work with CDC USB as unpleasant as usual. Not sure what makes difference here, if the OS or USB hardware.
I’ll try to modify the board for 1k5 resistor or use transistor to switch pull-up to see if it makes any difference.

jaromir
Tue May 03, 2016 7:20 pm
mrburnette wrote:…I reformatted Win8.1 and installed Linux Mint. Never looked back as it is too painful to answer the question of why I did not do this earlier! Whatever devotion I had from my MCSE certification is long gone.

Rick Kimball
Tue May 03, 2016 7:41 pm
Impressive rework soldering!

I think we have a new board .. the “Croquet Board” , a Blue Pill modified to act like a maple mini with colorful croquet mallet sized resistors : )

-rick


jaromir
Tue May 03, 2016 8:53 pm
Well… those are standard 0207 sized 1/4W resistors, they just look huge being so close to SMD parts. The transistor is SMD, because I didn’t have any TH low voltage P-MOS.
It is interesting how scale distorts our perception. For one contest – with constraint of PCB size maximally 1×1 inch – I designed quite dense doublesided PCB with 0603 passives and by mistake I edited one package to 1206 and it was enormously huge. The same 1206 component which was absolutely hi-tech ultra-small component (and 0805 was no-go) a few years ago, at least for me. Yet i still use TH components for quick prototyping.

No matter what, the board works now as I wish 8-)


zmemw16
Tue May 03, 2016 9:05 pm
@jaromir
wow on the soldering!
an amazing pain when you’ve not seen it done and trying to do it, follow and fill in the template when you have.
two resistors – ok i can do that.

pretty please.
as there’s an area in shadow, could you do a picture centered on the low end of the upper 1k5?
i thought it was a connection to a usb track – it’s not a shadow, you have a smd in there! :o
ok maybe not :(

stephen

3 nights with 4hrs.


RogerClark
Tue May 03, 2016 9:10 pm
I plan to use the same sort of circuit on some GD32 boards I have.
They have a USB connector, but no pull up resistor at all (another badly designed board).

I have tried fitting a 1.5k pullup and this works on some PCs but not on my new PC which has a Skylake chipset.

So when I get time, I will try the P FET solution, which I think is going to be far better than the 1.5k resistor on its own.


jaromir
Tue May 03, 2016 9:48 pm
zmemw16 wrote:
pretty please.
as there’s an area in shadow, could you do a picture centered on the low end of the upper 1k5?
i thought it was a connection to a usb track – it’s not a shadow, you have a smd in there! :o

zmemw16
Tue May 03, 2016 9:59 pm
thanks, brilliant and really nice closeups, out of curiosity what’s your day job? :D

noted that’s it’s a 1k5 and a 15k.

stephen


jaromir
Tue May 03, 2016 10:19 pm
Thanks. By the way, I took the photos under two table lamps with cheap 2,4W LED lightbulbs and Canon Powershot SX150IS – best 80EUR I ever spent on camera.
I’m embedded electronics design engineer/programmer at local company specialized in fiber optic systems.

Pito
Wed May 04, 2016 9:24 am
Any idea why Maple Mini is using such dramatic wiring for the 1k5 switching? (except they wanted to justify the price :) )

RogerClark
Wed May 04, 2016 10:01 am
Pito wrote:Any idea why Maple Mini is using such dramatic wiring for the 1k5 switching? (except they wanted to justify the price :) )

Leave a Reply

Your email address will not be published. Required fields are marked *