Re: Blue Pill Connect with ST-Link #arduino #bluepill #stm32 #usb


jmh6@...
 

Hi Dave,

Glad to read your note. Another chip family to stay away from. I am amazed at how many Arduino 428 projects are out there that 'just work'.

When I try to move even a simple program to a different Arduino ISP supported chip it no longer compiles.

For that reason, when I get serious about using a chip, I write my own stuff. Even the bootloader. At least then I have a chance of figuring out what really is wrong.

Most chips today seem loaded with poorly tested extra features. Reading Microchip errata can be really entertaining/disturbing. For the UART on one chip it says: If the first re-init attempt does not work, repeat until the UART starts running again. How are you supposed to know if it is working without sending lots of stuff over the wire to confuse another chip?

Huh!.... Even the UART does not work reliably.

Pretty sad!

I stop here :).

Lots of fun.

On Tue, 6 Apr 2021, David Leckie wrote:

Hi
 
I hope this helps anybody who is having problems connecting to their ?Blue Pill? via ST-Link and/or USB.
I had 6 Blue Pills that refused to program for various reasons.  Some were fakes (or clones) and some appeared to have the genuine STM Logo.  All were bought on eBay and
the picture showed the genuine STM logo.
Now all the fakes refused to program using the ?STM Flasher? and Uart method but the genuine ones would however I find this quite a convoluted method when
developing/debugging.  It?s OK for a ?one off? upload.
I then got an ST-Link V2 Programmer and downloaded/installed the STM32-Link programmer software.
Now here is the strange bit.
Some of the boards were recognised with Target->Connect and I could flash the Arduino bootloader OK.
But others refused to connect (some genuine same fakes)
However if I went to Target->Settings then selected ?Connect under Reset? and ?Reset Mode? ?Hard Reset?.
Now before pressing ?OK?I held the reset button on the board down. 
I now pressed ?OK?and released the reset button and they then connected OK.
After that I could flash the Arduino boot loader and program them from the Arduino IDE using USB.
The strange thing is that with two identical boards one would connect in ?Normal? mode but the other needed to connect in ?Connect Under Reset? mode.
I hope the above helps anyone having similar problems.
By the way has anybody got any experience of the ?Black Pill? boards (STM32F411) with the ARM Cortex M4 MPU?I gather that so far the market has not (yet?) become ?flooded? with
fake ?Black Pill? boards.
Hope this helps somebody.
73
Dave
GM4NFI

Join SoftwareControlledHamRadio@groups.io to automatically receive all group messages.