Newbie stuck at first flash attempt (STM32F103)

Post here all questions related to STM32 core if you can't find a relevant section!
User avatar
Juraj
Posts: 47
Joined: Fri Jan 03, 2020 7:47 pm
Answers: 1
Location: Slovakia
Contact:

Re: Newbie stuck at first flash attempt (STM32F103)

Post by Juraj »

I want to know what upload method did you select? your post doesn't contain the command
Miq19
Posts: 15
Joined: Tue Jul 14, 2020 2:59 pm

Re: Newbie stuck at first flash attempt (STM32F103)

Post by Miq19 »

I am not at the PC anymore, but I think it was "Cube Programmer (Serial)".
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Newbie stuck at first flash attempt (STM32F103)

Post by ag123 »

Miq19 wrote: Wed Jul 15, 2020 9:02 am Thanks, I will do that. I contacted the vendor for an explanation - we will see how they react. Is it possible to tell fake boards from the chip? Mine look like this:
Image
here is something interesting, stm32 markings
https://blog.gpjtag.com/?p=1027

but i'd guess if someone is determined to fake it, they'd likely use a marking found on an existing real stm32

more interesting links
https://www.cnx-software.com/2020/03/22 ... m32-fakes/
https://github.com/keirf/Greaseweazle/wiki/STM32-Fakes
https://embeddedtronicsblog.wordpress.c ... ll-boards/
https://www.eevblog.com/forum/microcont ... m32-right/
https://www.eevblog.com/forum/projects/ ... our-help!/
https://community.st.com/s/question/0D5 ... -or-clone-
of course one thing is a missing ST logo, i'm not sure if that's after all a good hint :?
did the fakers forget to add the ST logo? :lol:
this one looks real enough
https://futurlec.com/STM32_Development_Board.shtml
Image

an old thread here
viewtopic.php?f=7&t=80
Miq19
Posts: 15
Joined: Tue Jul 14, 2020 2:59 pm

Re: Newbie stuck at first flash attempt (STM32F103)

Post by Miq19 »

By the way: the vendor responded. They asked me to report if the ST-Link has worked as soon as I got it and the source markings they have printed on the packages I received to find out their provider responsible. They confirmed I will get full refund anyway.
fredbox
Posts: 125
Joined: Thu Dec 19, 2019 3:05 am
Answers: 2

Re: Newbie stuck at first flash attempt (STM32F103)

Post by fredbox »

Since you are on Windows, see if you can get the Flasher-STM32 application working with a serial-usb connection.
See https://www.st.com/en/development-tools ... stm32.html for the program and https://youtu.be/wGbiT6IxGP0?t=257 for an example of using it.
Miq19
Posts: 15
Joined: Tue Jul 14, 2020 2:59 pm

Re: Newbie stuck at first flash attempt (STM32F103)

Post by Miq19 »

fredbox wrote: Wed Jul 15, 2020 11:23 pm Since you are on Windows, see if you can get the Flasher-STM32 application working with a serial-usb connection.
See https://www.st.com/en/development-tools ... stm32.html for the program and https://youtu.be/wGbiT6IxGP0?t=257 for an example of using it.
Do you know that Caleb did an update on that video? See here: Youtube link. That was exactly how I got here, with failing uploads and all.
Miq19
Posts: 15
Joined: Tue Jul 14, 2020 2:59 pm

Re: Newbie stuck at first flash attempt (STM32F103)

Post by Miq19 »

[Update, see below!]

I got the ST-Link V2 today and am somewhat further, but not much to the better.

I was able to upload the HID 2.2 bootloader with ST-Link, but could not upload more that a single sketch the first time I tried it. All further attemps were resulting in

Code: Select all

 Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found
Uploading the bootloader again (I tried this several times) did not resolve this, and all three devices are behaving the same way.

Only when I plugged the device immediately after the first bootloader upload, the PC13 LED was blinking very fast and I could upload a sketch. In all later attempts the PC13 LED kept blinking like the Blink sketch I uploaded commands.

[Update]
I tried to set the Port in the Arduino IDE Tools menu to that of the device and know what? Now it seems to work?!? The COM port is not used at all for uploading, or is it?
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Newbie stuck at first flash attempt (STM32F103)

Post by ag123 »

using the serial uart boot loader or using st-link swd to flash the firmware, normally the install location is 0x8000000 - start of flash.
if you used a boot loader e.g. usb dfu boot loader it sits there.
you can make a sketch and install it there using st-link or usb-uart (set boot0),
select the upload methods correctly, they influence the start location of the sketch binary, e.g. the 'roger's stm32duino usb dfu' bootloader would expect the sketch to sit at 0x8002000, older original 'maple usb dfu' bootloader would expect the sketch to sit at 0x8005000, and an st-link or usb-uart install makes it (the sketch) sit at 0x8000000
in that way you can try to test some functionalities without an 'additional' bootloader by installing at start of flash
e.g. blink the led at pc13 as is conventional for blue pill
testing the 'realness' or 'fakeness' of the chip can be pretty tough/challenging, normally a lousy fake would fail blinky
but i've come across articles about the vendor substituting the chip with a cortex M0 with (much) less memory and flash, that may incidentally work as it is after all a smaller chip, but your memory and flash size is compromised.
then there are 'clones' e.g. the cks32 and apm32, i've read stories about some success with those.
but nevertheless, i'd guess if stm32f103 is new to you, get something real so that you can have a benchmark to compare against
if perhaps to distinguish what the expected behavior should be.
nevertheless good luck & have fun with the boards ;)
Miq19
Posts: 15
Joined: Tue Jul 14, 2020 2:59 pm

Re: Newbie stuck at first flash attempt (STM32F103)

Post by Miq19 »

Thank you for your advice and helpful hints!
paynterf
Posts: 3
Joined: Sat Aug 01, 2020 3:50 pm

Re: Newbie stuck at first flash attempt (STM32F103)

Post by paynterf »

I just went through this same process (and I do mean 'just' - it was yesterday!) with two brand-new 'blue pill' MCU I got from Amazon. The saving grace for me was this video, which goes through the process of uploading an Arduino bootloader in great detail.
Post Reply

Return to “General discussion”