Serial over CDC data uploads but doesn't print any data

Lfeliciano
Posts: 7
Joined: Mon Oct 19, 2020 12:48 pm

Re: Serial over CDC data uploads but doesn't print any data

Post by Lfeliciano »

Hi fredbox, thanks for the support,
fredbox wrote: Wed Oct 21, 2020 8:51 pm 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.
That's very strange, I have a bunch of boards with that same configuration, on the High-density (VET6 and the ZET6) devices and all of them work nicely with the bootloader 2.0 and the Rogers core, no need for any external hardware on the serial one or the ST-Link for it. Even for the smaller ones, I never had to use the USB to serial adapter after have uploaded the bootloader and have to worry about the jumpers as the bootloader is pretty stable.

The only problem that I'm facing is the USBSerial, the bootloader works ok, I can upload the code and make the device work, I get the feedback from the Bluetooth device.

The idea is to not use any external hardware to do the upload, I had made with Rogers core even a bootloader for updating the code from the SDcard with no problem, the bootloader is even better because it makes the rollback to another version in the case of a new uploaded code doesn't work, so it's possible to have this oversight from this "first code", but as I'm getting used to this core, I'm only making some tests and that was the first bump from the start hahaha.

So the bootloader is not the issue to make the USBserial work, maybe there is some config after the update, that resets something or changes some config in the USB to make it not work properly.

Using Roger's core I don't get any problem, I've only changed to be able to use the LowPower lib. It's quite strange that everything else works, just the USBserial doesn't deliver any data.

But anyway, many thanks fredbox, I'm still checking for differences on both implementations.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial over CDC data uploads but doesn't print any data

Post by fpiSTM »

We already face an issue using the bootloader. In fact the BL does not leave the USB in a correct state then not able to properly initialized it.

Did you try a minimal sketch which only print on Serial (SerilaUSB) ?
I've already tested USB on STM32F103ZE wihtout any issue.

Another way should be to try without bootloader and check if USB works properly.
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Serial over CDC data uploads but doesn't print any data

Post by mrburnette »

Lfeliciano wrote: Wed Oct 21, 2020 9:20 pm ...
Using Roger's core I don't get any problem, I've only changed to be able to use the LowPower lib. It's quite strange that everything else works, just the USBserial doesn't deliver any data.

IMO, you should not use a bootloader for STM32 Official Core projects, SWD is such an easy way to flash. Bootloaders were designed to assist with the crazy way of the Calculus programming methodology - you know, successive approximation: make a change and flash, make another change and flash, repeat until working. Bootloaders are bad karma in the world of microcontrollers, IMO :o

Were I going for low-power, get rid of that inefficient 3.3V regulator and go to a DC-DC (bulk or boost) module with 94% efficiency or better. Good investment.

For Roger's Core (libmaple): We had a discussion about low-power back in the old forum (several discussions) and I will summarize by saying unless you can characterize your power usage, you can not really characterize your power savings.
https://stm32duinoforum.com/forum/viewt ... _1164.html

For Maple Mini, blue pill, etc:

Image

Maybe continue to read here: http://stm32duinoforum.com/forum/viewto ... rt_10.html

In the LeafLabs forum, some discussion years ago about low power operation.

Other resources:
https://jeelabs.org/2018/standby-current-f103/

https://www.st.com/resource/en/applicat ... ronics.pdf
Lfeliciano
Posts: 7
Joined: Mon Oct 19, 2020 12:48 pm

Re: Serial over CDC data uploads but doesn't print any data

Post by Lfeliciano »

Guys

Many thanks for the effort, I ended up not pursuing the solution for the USB serial port,

I've narrow down to the clock configuration and the On-OFF procedure that Roger's core does.

My main issue with Roger's core was the return from sleep and the clock adjustment after that, but right now I can get some 5 mA in sleep mode ( with some extra components on sleep, GPS, BT, and the GPRS), which is quite ok for me.

I'm using a TPS6302 @mrburnette, they're pretty good, especially as they have a mode for low power consumption, where they use a sync configuration with the output current to work more efficiently at low power. The cost is low and some 92% efficiency.

anyway @fpiSTM I'll do the test so if someone someday comes up with this problem, they can use this info.

Many thanks, guys, I'm sorry if I took too much of your time.
Post Reply

Return to “STM32F1 based boards”