Customer:
I have a problem with USB communication (CDC) on the STM32F103C8T6. When sending messages via CDC, nothing appears in the console. When connecting to a Windows computer, the COM port is not recognized at all. I tried installing a bootloader using STM32CubeProgrammer, but that didn’t help either. Is there a solution for establishing serial USB communication?
Original message (Croatian)
Javljam se u vezi problema s USB komunikacijom (CDC) na stm32f103c86t.
Salanjem poruke putem CDCa ne prikazuje se ništa u konzoli, spajanjem na računalo s Windows OS-om, COM port uopće nije prepoznat, probao sam staviti bootloader pomoću STM32CubeProgrammera, no ni to nije pomoglo pa me zanima postoji li rješenje za uspostavljanje serijske usb komunikacije?
Originally submitted via email support on 3 April 2023. Migrated to the forum for community visibility.
Soldered Support:
USB should work normally. Can you send us the code and examples you’ve been using, or just links to examples so we can test on our board to confirm the code is correct? It will also be easier for us to identify if there’s a hardware issue with the code you’re using.
Original message (Croatian)
USB bi trebao normalno raditi. Možete nam poslati kod i primjere koje ste koristili ili samo linkove na primjere kako bi mogli testirati na našoj pločici da potvrdimo da je u kodu sve ispravno. Također bit će nam lakše otkriti ako postoji neka greška na pločici s kodom koji Vi koristite.
Customer:
I’ve tested on 2 boards, used new wires and tried several different cables. Here’s one of the examples I followed: STM32 USB CDC Virtual COM Port: CubeMX Setup, Transmit & Receive Data
Original message (Croatian)
Poštovani, Hvala na odgovoru, u prilogu je projekt i jedan od primjera koji sam pratio. Isprobao sam na 2 pločice, korištene su nove žice i promjenio sam nekoliko kablova.
STM32 USB CDC Virtual COM Port: CubeMX Setup, Transmit & Receive Data
LP, [name removed]
Attachment omitted in migration: TestUltra.zip
Customer:
Also, when I run sudo dmesg -w on Ubuntu 20.04 and connect the Croduino STM32 (ST-Link V2 and USB), it only recognizes the ST-Link, not a USB SCM device.
Original message (Croatian)
Također output sudo dmesg -w (na ubuntu 20.04) kad spojim CroduinoSTM32 (st-linkv2 i USB), prepoznaje samo st-link, a ne i USB SCM device.
Attachment omitted in migration: CroduinoSTM32.png
Soldered Support:
We tested the STM32F103 board with your example code and we also cannot get it to work via USB for serial communication. A colleague tried testing upload via USB and that also doesn’t work as you described. It’s possible something was changed in the bootloader and options so it no longer works as before, which is why you can’t set up the board to use USB for serial communication. We’ll get back to you next week with new information once we’ve tested why USB isn’t working.
Original message (Croatian)
isprike na dužem čekanju.
Testirali smo STM32F103 pločicu s vašim primjerom koda i također ne možemo dobiti da radi putem USB-a, odnosno da USB bude za serijsku komunikaciju. Kolega je probao testirati upload putem USB-a i to također ne radi kao što ste i vi napisali. Postoji mogućnost da je nešto promijenjeno u bootloaderu i opcijama te više ne radi kao prije te is toga razloga ne možete namjestiti da pločica ima USB za serijsku komunikaciju.
Javimo se sljedeći tjedan s novim informacijama kada uspijemo testirati zašto ne radi USB.
Soldered Support:
This is how we got USB serial upload working on the Croduino board:
You need to do the following steps:
- Download the STM32duino bootloader (I used generic_boot20_pc13.bin) from STM32duino-bootloader/binaries at master · rogerclarkmelbourne/STM32duino-bootloader · GitHub
- Flash it via ST-Link or USB-to-serial converter. Use stm32cubeprogrammer for ST-Link, or you can upload via stm32 flasher utility for USB-to-serial (ST-Link is recommended).
- If ST-Link doesn’t work, you need to enable ‘shared’ mode when connecting.
- Before flashing, disconnect the STM32 and set the BOOT switch to position 1. After flashing, disconnect and set it to 0.
- At this point USB connection wasn’t working, but it should have been. It started working after I connected a 1k resistor between A12 and 3V3.
- Now install the board definition by adding this link to the additional board manager URLs: http://dan.drown.org/stm32duino/package_STM32duino_index.json
- In the boards manager, install the appropriate boards.
With these settings, code upload and serial print work.
Original message (Croatian)
isprike na kasnom odgovoru. Ovako smo uspjeli dobiti upload preko USB seriala na toj Croduino Pločici:
Potrebno je uraditi sljedeće korake:
Skinuti STM32duino bootloader (ja sam koristio generic_boot20_pc13.bin) sa linka STM32duino-bootloader/binaries at master · rogerclarkmelbourne/STM32duino-bootloader Flashati preko ST LINK-a ili preko USB-to-serial konvertera. Za ST link koristiti stm32cubeprogrammer a za usb-to-serial se može uploadati preko stm32 flasher utility-a (preporučujem st link). Ako ne radi st link onda treba uključiti ‘shared’ mode pri povezivanju. I prije flashanja iskopčati STM32 i staviti BOOT prekidač u 1. Nakon flashanja iskopčati i staviti u ‘0’. U ovom trenutku USB povezivanje nije radilo, a trebalo je, proradilo je nakon što sam spojio 1k otpornik između A12 i 3V3. Sada treba instalirati board definition, dodati ovaj link u additional board manager url’s http://dan.drown.org/stm32duino/package_STM32duino_index.json U boards manageru instalirati ove boardove:
Sa ovim postavkama se može uploadati kod:
Upload koda i serial print rade
Attachment omitted in migration: image.png
Attachment omitted in migration: image.png
Attachment omitted in migration: image.png