Serial over CDC data uploads but doesn't print any data
-
- Posts: 7
- Joined: Mon Oct 19, 2020 12:48 pm
Serial over CDC data uploads but doesn't print any data
Hi guys,
I'm using a stm32f103vet6 with the last core(1.9.0) as I'm migrating from the Rogers core, as I'm looking for the LowPower mode.
I'm using the generic bootloader from him, and I'm able to, using the "Maple DFU bootloader 2.0", with the USART support enable and the CDC with Generic USART to automatic reset over the DRT, upload a new code and the code runs like a charm. (if there is a better bootloader or a proper one for using with the core, I would like to know, it was quite confusing to find the right bootloader as the infos are mixed with different boards)
The problem that I'm facing is that the I don't receive any data from the microcontroller, I've a bluetooth connected to the serial1 and it shows me all the data, but when I open the serial port, nothing appears. The device name for my COM6 is 'STMicroelectronics'.
Using Roger's core it works ok, I can send the data over serial and watch over the serial port on my VScode, with the stm32duino core, the serial opens, the code runs but nothing comes out.
I wonder that could be something with the USB reset, but I don't know how to proceed and I've tried to get info on the "stm32duinoforum" but many pages are not working. Anything from you guys that have more experience with this core will be very helpful.
Many thanks
I'm using a stm32f103vet6 with the last core(1.9.0) as I'm migrating from the Rogers core, as I'm looking for the LowPower mode.
I'm using the generic bootloader from him, and I'm able to, using the "Maple DFU bootloader 2.0", with the USART support enable and the CDC with Generic USART to automatic reset over the DRT, upload a new code and the code runs like a charm. (if there is a better bootloader or a proper one for using with the core, I would like to know, it was quite confusing to find the right bootloader as the infos are mixed with different boards)
The problem that I'm facing is that the I don't receive any data from the microcontroller, I've a bluetooth connected to the serial1 and it shows me all the data, but when I open the serial port, nothing appears. The device name for my COM6 is 'STMicroelectronics'.
Using Roger's core it works ok, I can send the data over serial and watch over the serial port on my VScode, with the stm32duino core, the serial opens, the code runs but nothing comes out.
I wonder that could be something with the USB reset, but I don't know how to proceed and I've tried to get info on the "stm32duinoforum" but many pages are not working. Anything from you guys that have more experience with this core will be very helpful.
Many thanks
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: Serial over CDC data uploads but doesn't print any data
How it is supposed to work:
https://github.com/stm32duino/wiki/wiki ... wareserial
... after all the years since I built this QBF send/receive, I still find it invaluable:
https://www.hackster.io/rayburne/the-qb ... tor-ae7015
https://github.com/stm32duino/wiki/wiki ... wareserial
... after all the years since I built this QBF send/receive, I still find it invaluable:
https://www.hackster.io/rayburne/the-qb ... tor-ae7015
-
- Posts: 7
- Joined: Mon Oct 19, 2020 12:48 pm
Re: Serial over CDC data uploads but doesn't print any data
Thanks mrburnette but what I ment is that the USB serial doesn't print anything
All other Hardware serial ports work ok, just the USB emulated one witch is named USBSerial on Arduino is the problem.
Do you have any idea on what it could be, as I said it works with Rogers core, but it doesn't work with the stm32duino core.
Thanks again.
All other Hardware serial ports work ok, just the USB emulated one witch is named USBSerial on Arduino is the problem.
Do you have any idea on what it could be, as I said it works with Rogers core, but it doesn't work with the stm32duino core.
Thanks again.
Re: Serial over CDC data uploads but doesn't print any data
I have on issue with SerilaUSB on STM32F1.
You have well enable the USB support to CDC (generic 'Serial' supersede U(S)ART) ?
You have well enable the USB support to CDC (generic 'Serial' supersede U(S)ART) ?
-
- Posts: 7
- Joined: Mon Oct 19, 2020 12:48 pm
Re: Serial over CDC data uploads but doesn't print any data
Hi fpiSTM,
Yes, that's my current configuration.
![Image](https://i.ibb.co/74Q21Nh/Capture.png)
even when I disable the configurations and create the USBSerial object, the interface doesn't work,
also, I've reinstalled the drivers to make sure that the drivers were not wrong and tested with Zadig to see the information on the drivers was that one:
![Image](https://i.ibb.co/Jkkb86C/zadig.png)
Thanks
Yes, that's my current configuration.
![Image](https://i.ibb.co/74Q21Nh/Capture.png)
even when I disable the configurations and create the USBSerial object, the interface doesn't work,
also, I've reinstalled the drivers to make sure that the drivers were not wrong and tested with Zadig to see the information on the drivers was that one:
![Image](https://i.ibb.co/Jkkb86C/zadig.png)
Thanks
Re: Serial over CDC data uploads but doesn't print any data
Well in that case it is probably an USB clock issue.
Which board you used ? Does it have an HSE ? which value ?...
Edit: You see the device? it is properly enumerated ?
Which board you used ? Does it have an HSE ? which value ?...
Edit: You see the device? it is properly enumerated ?
-
- Posts: 7
- Joined: Mon Oct 19, 2020 12:48 pm
Re: Serial over CDC data uploads but doesn't print any data
It's a self-made board, I've made the project following the most common stm32 board, like the bluepill ( the generic one) but using the High density VET6 model. I don't have this issue with Rogers core, that's why I didn't suspect that was related to the clock.
I'm using one 8 MHz external xtal for the HSE and a 32.768 kHz for the LSI.
I'll need some help on that, the device manager identifies it as STM Serial with the Enumerator USB so I guess it's working properly, the path "USB\VID_0483&PID_5740\48F53F893535" the same that I saw In some other posts related to the Serial.
Thanks for the help.
Re: Serial over CDC data uploads but doesn't print any data
Even if your clock work well if the config is not properly set this will not work: ![Wink ;)](./images/smilies/icon_e_wink.gif)
Anyway as the USB seems properly enumerated this should be fine.
Could you share the schematics, please?
![Wink ;)](./images/smilies/icon_e_wink.gif)
Anyway as the USB seems properly enumerated this should be fine.
Could you share the schematics, please?
-
- Posts: 7
- Joined: Mon Oct 19, 2020 12:48 pm
Re: Serial over CDC data uploads but doesn't print any data
Sure, here it is
If that is a problem with the xtal, should it happen as well with rogers core and eventually make the microcontroller stall or have some other issues?
Thanks again!
Re: Serial over CDC data uploads but doesn't print any data
All of those connectors and no SWD pins?
I have a commercial STM32F103VET6 board that I program using either a ST-Link dongle or a USB/Serial adapter connected to USART1. I never could get any bootloader stable enough to be useful.
The ST-Link is the way to go. The code uploads in seconds and no fooling around with jumpers or reset buttons.
Once the code is uploaded with USB serial enabled, the device enumerates properly as a com port and serial print() works as expected.
This is USB Serial running a simple command intrepreter:
My Arduino configuration is the same as yours except for the upload method.
I have a commercial STM32F103VET6 board that I program using either a ST-Link dongle or a USB/Serial adapter connected to USART1. I never could get any bootloader stable enough to be useful.
The ST-Link is the way to go. The code uploads in seconds and no fooling around with jumpers or reset buttons.
Once the code is uploaded with USB serial enabled, the device enumerates properly as a com port and serial print() works as expected.
Code: Select all
Memory Programming ...
Opening and parsing file: Ficus_Test.ino.bin
File : Ficus_Test.ino.bin
Size : 23800 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 11]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.962
RUNNING Program ...
Address: : 0x8000000
Application is running
Start operation achieved successfully
Code: Select all
[Wed Oct 21 15:41:22 2020] usb 5-2: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 0.00
[Wed Oct 21 15:41:22 2020] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Wed Oct 21 15:41:22 2020] usb 5-2: Product: GENERIC_F103VE CDC in FS Mode
[Wed Oct 21 15:41:22 2020] usb 5-2: Manufacturer: STMicroelectronics
[Wed Oct 21 15:41:22 2020] usb 5-2: SerialNumber: 48DA766C3232
[Wed Oct 21 15:41:22 2020] cdc_acm 5-2:1.0: ttyACM0: USB ACM device
Code: Select all
Command? help
help: show command list
qbf n: print quick brown fox n times
setblink n: set n blinks per second
Command? qbf 1
The quick brown fox jumped over the lazy dog's back
Command?