STM32f103C not recognized by win10 = not serial monitor

Post here first, or if you can't find a relevant section!
Post Reply
Vizi
Posts: 4
Joined: Mon Jul 20, 2020 11:47 am

STM32f103C not recognized by win10 = not serial monitor

Post by Vizi »

Im newbie in stm32 things. I recently bought my first stm32f103c with st-link 2v in bundle from my local electronics store. I downloaded the drivers for stl link (en.stsw-link009), the downloaded lib Arduino_STM32-master to my Documents\Arduino\hardware. Then i uploaded blink skethch to check if stm32 is working. Led was blinkg how i wanted. Then i realized i have no COM port available. After few min i found that st-link can only upload, im ok with it. So i disconected the st-link, and connected stm32 to my pc by usb cable. Devices was not reconized by win10 , in devices manager i found "Unknow USB Device( Device Descriptor Request Failed). so i start searching in web. I found some arcitcles how to uplaod bootloder to my stm32 and use it like that, but it takes around 20kb of memory. is there any way to read serial monitor from stm32f103 without installing bootloader on it? Cause i would like still upload by sketches by st-link but ofc i need somehow read the serial monitor to debug by programs :S

EDIT: I double checked my bord and it seems i have wrong r10 resistor, i got there 103 so its 10k resistor? i measured resistance 3,3v to PA12 and i got 9.9k. So that might be the reason?
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: STM32f103C not recognized by win10 = not serial monitor

Post by stevestrong »

viewtopic.php?f=2&t=301
Which core did you use?
Which board did you select in Arduino IDE?
Have you selected support for USB serial in Arduino IDE menu?
Have you installed the USB serial drivers?
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32f103C not recognized by win10 = not serial monitor

Post by ag123 »

if you are using libmaple core usb-serial is default.
if you are using STM32 official core, you need to select USB-CDC in your config to have USB-CDC.
if there is nothing in the sketch in the device listening on usb of course you won't get anything showing on the host.
and of course on Windows, you'd need to get the appropriate drivers installed.
normally for comm ports, my guess is Windows should be able to recognize it, but it may not be always true
Vizi
Posts: 4
Joined: Mon Jul 20, 2020 11:47 am

Re: STM32f103C not recognized by win10 = not serial monitor

Post by Vizi »

I installed only: STL drivers and 2 bat files from "Arduino_STM32-master\drivers\win" >>install_drivers and install_STM_COM_drivers.
My arduino IDE settings for st-link uploading sketch.
Image
you also asking about USB serial, i dont see that option, you taling about sth like this ? viewtopic.php?f=62&t=269&p=1755&hilit=s ... itor#p1755
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32f103C not recognized by win10 = not serial monitor

Post by ag123 »

this looks like the libmaple (roger's) core, please mention the core along with queries as the 2 cores has different features.
it is quite possible the resistor is causing a problem, but normally it still works on some pcs.
try to press reset and to see what happen.
and in your sketch try codes like this

Code: Select all

void setup() {

Serial.begin();
digitalWrite(LED_BUILTIN,0); //on blue pill it is active low, so this is 'ON'
while(! Serial.available() );
digitalWrite(LED_BUILTIN,1); 

Serial.println("you are connected");
}
this code mainly turn on the led and wait for a input on the usb-serial console.
the other thing is look in device manager (Windows), if you can find 'unknown device', it is likely a driver is not installed.
review installation guides in the wiki
https://github.com/rogerclarkmelbourne/ ... stallation

for libmaple core normally SERIAL_USB needs to be defined.
if for any reason you think it isn't defined, try to declare in the global variables

Code: Select all

extern USBSerial Serial;
you can find such codes in usb_serial.h
Last edited by ag123 on Mon Jul 20, 2020 4:01 pm, edited 1 time in total.
Vizi
Posts: 4
Joined: Mon Jul 20, 2020 11:47 am

Re: STM32f103C not recognized by win10 = not serial monitor

Post by Vizi »

I just uploaded ur sketch with my settings, then i unplugged the st-link and conenct to pc via usb cable, notthing happed, just quick "new deviced plugged to usb" windows sound and communicate about not reconized device.

also my board thing:
Image
the other thing is look in device manager (Windows), if you can find 'unknown device', it is likely a driver is not installed.
review installation guides in the wiki
https://github.com/rogerclarkmelbourne/ ... stallation
this is a "Arduino_STM32-master\drivers\win" >>install_drivers and install_STM_COM_drivers. andi done it

i ll remove now the r10 resistor and solder the 1.5-8k between pa12 and 3.3v. Maybe it change sth.
Vizi
Posts: 4
Joined: Mon Jul 20, 2020 11:47 am

Re: STM32f103C not recognized by win10 = not serial monitor

Post by Vizi »

Ok so i found another board which i bought long time ago from aliexpress. This one works perfecr, r10 is 152 like it should, and after connecting it to usb maple mini com appears. So the one i bought in local store turns out to be cheap fake. i need to labeil it to not beconfused and jsut use the good one to prototyping and debugging and the fake one for final code.

Thx all for help
Post Reply

Return to “General discussion”