Generic STM32F103R board not showing up in device manager and serial ports

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
zmemw16
Posts: 974
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby zmemw16 » Mon Mar 13, 2017 3:22 pm

i'll take the risk

the jumpers for boot0 and boot1 are 'normally' each in a line of 3 pins, the middle pin is the boot line.

'o' or gnd........bootn........... '1' or 3v3
////|...............| link

'o' or gnd........bootn........... '1' or 3v3
///////////// |...............| link

they were almost certainly set to the 0 side of those 3 pins originally
apologies if i'm teaching you how to suck eggs :D :D :D :D
stephen

blahlicus
Posts: 4
Joined: Sun Mar 12, 2017 6:23 pm

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby blahlicus » Tue Mar 14, 2017 1:17 pm

Here are some high resolution macro shots of the front and back as requested, it has an onboard RS232 to upload from, has an STLink connector, and the client USB, I tried checking continuity of the data pins of the USB and got 400ohm on one of the pins on the controller, but I don't really know what to probe for so any guidelines would be nice.

Image
Image

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

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby stevestrong » Tue Mar 14, 2017 1:34 pm

According to the datasheet, BOOT0 is solely as input available on pin 60 of the LQFP64 package. Please check if you can access it.
BOOT1 is connected to PB2.
Now you know how and which pins you should control to flash the bootloader and upload further software.

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

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby Pito » Tue Mar 14, 2017 4:10 pm

usb part.JPG
usb part.JPG (22.37 KiB) Viewed 76 times

from that picture r21, r23, r24, Q1, r8, and r13 are related to USB, so the USB circuitry is there.
Q1 is most probably the 1.5k usb signalling switch.
Now the question is from which 103R's pin the Q1 transistor is driven - most probably from a pin which is not set in the bootloader.

zmemw16
Posts: 974
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby zmemw16 » Tue Mar 14, 2017 5:06 pm

looking at the top right, the red links are boot0 & boot1
they're both 3v3, that's boot from embedded sram according to AN2606
boot1 boot0
X 0 user flash
0 1 system flash
1 1 sram

try moving boot0 to gnd or move both to gnd
if you have one, try using a stlink, well worth the £2 or so

the other red links (bottom right) appear to be set for usb, alternative is CAN on the right hand end of the bottom rows

the vet/zet variant has transistors q2, q3 associated with the serial interface, so try the board against that schematic for vct/vet
hth
stephen

victor_pv
Posts: 945
Joined: Mon Apr 27, 2015 12:12 pm

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby victor_pv » Wed Mar 15, 2017 5:19 pm

From the pictures looks like the transistor Q1 is wired to pin 38 in the MCU (PC7), not sure if it is active High or Low.
The USB pins go PA11 and PA12, which are the right ones.
If PC7 is driven the wrong way it may be blocking USB communication. I dont remember how the pull up transistor is managed in the Maple (active high or low?), but I do believe in the code for Generic boards we don't even try to use a pin for that functions, so it is probably left as input, in which case the transistor may or may not be leaving the pull up resistor connected. Unless the resistor get's disconnected, the USB serial may not enumerate at all.
You could try in your sketch driving that pin low for a few ms, then high. And if that doesn't work try the other way, driving it low, then high. I dont remember how long the pull up resistor needs to be connected, I believe it should be in response to some host action, but in practice I think the core just keeps it connected for set amount of time, try a ms or two.

Now, as far as the software. I think like someone posted before, that you may not be following the right process.

To get the USB serial detected you need to:
1.- Upload the stm32duino bootloader. At this point the board should show as a DFU device, but NOT as serial.
2.- Upload a sketch using the stm32duino bootloader. At this point the Serial USB should show up.

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

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby Pito » Wed Mar 15, 2017 5:43 pm

The high-side USB switch is active low (pnp or pmos Q1). The pin driving the Q1 must be set and compiled within the bootloader.

victor_pv
Posts: 945
Joined: Mon Apr 27, 2015 12:12 pm

Re: Generic STM32F103R board not showing up in device manager and serial ports

Postby victor_pv » Thu Mar 16, 2017 3:36 am

Pito wrote:The high-side USB switch is active low (pnp or pmos Q1). The pin driving the Q1 must be set and compiled within the bootloader.

The pin needs to be set and compiled in the bootloader for the DFU enumeration, but also in the core for re-enumeration when the sketch starts and Serial-USB starts with it.

The bootloader only provides DFU. The core has another piece of code for driving the pull up, without that a re-enumeration will not happen after the bootloader is finished and the sketch starts, and the board would keep showing up as DFU. For maple boards that code drives the corresponding pin to manage the transistor. For generic boards what we do is change the usb pin mode to output pull up for a short period, then back to input mode.

But if that transistor is active low and the pin is floating, the resistor should stay disconnected, so the effect would be like not having it, and the enumeration by output-pullup should take place normally.

I wonder if the OP is compiling for Maple R3. That may cause the wrong re-enumeration code to be used.


Return to “Generic STM32F103”

Who is online

Users browsing this forum: No registered users and 2 guests