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


David Leckie
 

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


jjpurdum
 

David:

I bought some Black Pills a long time ago and they both had the bootloader flashed on them. They were Maple Mini's and are actually the STM32F411 variety. As I recall, they cost around $10, but both were 100mHz with 256K of flash and 128K of SRAM.

Jack, W8TEE

On Tuesday, April 6, 2021, 11:12:32 AM EDT, David Leckie <djcleckie@...> 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


Tom, wb6b
 

On Tue, Apr 6, 2021 at 08:12 AM, David Leckie wrote:

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.

 

This is interesting. I'll keep this in mind if I get a phony Blue Pill board. So far I've been lucky. Must have bought most of my boards before the sources of non-genuine STM32 chips started to be used.  

Also, all the Blue Pills I have do not have boot loaders, so one would need to be flashed if I wanted one. However, I ether use a ST-Link or the built into the chip serial programmer that requires a USB to TTL serial adaptor and moving the "Boot-0" jumper to activate. 

I remember some YouTube videos that offered some possible solutions to programming these non STM32 Blue Pill boards. But your press the reset at the right time seems like a good solution. 

I think most of the Chinese suppliers would like to supply working stuff. Many sell everything from bath towels to rings, so they just rely on what their supplier says the electronic thing is. I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves. 

Tom, wb6b


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


jjpurdum
 

The problem is that the Arduino (Atmel) family have not kept pace. The STM32 family was doing pretty well in the Arduino IDE using the core written by Roger Clark. The the STM people came in and made their core available and that really muddied the waters. The ESP32 people, seeing what was going on with the STM32, jumped in with a patch. The problem there is there are a bazillion iterations of that board, with 32 up to 38 pins, some of which you shouldn't even have access to.

In all of this, however, the Teensy family has always had a reliable core and access to it with Paul's libraries. The Teensy 4.1 is a beast! It has a deep resource pool with up to 8mB of flash, all scooting along at 600mHz, plus a lot of I/O pins and reliable libraries to make things work. The only downside of the Teensy family is that they are more expensive than the other alternatives. Still, for me, if I value my time at more than two cents an hour, their reliability is worth the price.

Jack, W8TEE

On Tuesday, April 6, 2021, 4:14:28 PM EDT, jmh6@... <jmh6@...> wrote:



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
>
>
>
>






howard winwood G4GPF
 

prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


Arv Evans <arvid.evans@...>
 




You may have noticed that the "Free Shipping" from many countries
seems to have declined concurrently with increases in price.  This
probably reflects removal of free mail between those countries and
the USPS. 

_._


On Tue, Apr 6, 2021 at 2:44 PM howard winwood G4GPF <winwoodh@...> wrote:
prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


jjpurdum
 

Another thing to be careful of is, even if you opt for "North America" only on your eBay searches, a lot of foreign sellers are aware of that and now have drop-ship addresses in the US. Always pay attention to the "arrival date" on a purchase. I had one vendor "in CA" who promised delivery by June 3. Seems like a pretty long delivery time from CA.

Also, I sent a copy of one of my books to a friend, but sent it "media rate". It took 75 days for it to be delivered. My guess is that 3% of the postage cost was for delivery, the remaining 97% for storage.

Jack, W8TEE

On Tuesday, April 6, 2021, 4:51:40 PM EDT, Arv Evans <arvid.evans@...> wrote:





You may have noticed that the "Free Shipping" from many countries
seems to have declined concurrently with increases in price.  This
probably reflects removal of free mail between those countries and
the USPS. 

_._


On Tue, Apr 6, 2021 at 2:44 PM howard winwood G4GPF <winwoodh@...> wrote:
prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


jjpurdum
 

Worst type of tax Man ever devised.

Jack, W8TEE

On Tuesday, April 6, 2021, 4:44:34 PM EDT, howard winwood G4GPF <winwoodh@...> wrote:


prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


Daniel Lavin <dan_ll@...>
 

It's the tariff, as well as shipping.  There is no VAT involved, but EBay does collect your local sales tax.


On 4/6/2021 4:59 PM, jjpurdum via groups.io wrote:
Worst type of tax Man ever devised.

Jack, W8TEE

On Tuesday, April 6, 2021, 4:44:34 PM EDT, howard winwood G4GPF <winwoodh@...> wrote:


prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


Virus-free. www.avg.com


Tom, wb6b
 

It makes sense for shipping rates to be reasonable. Lots of small businesses rely on it and, in any country, it helps their economy. Unless we want an economy where only fourtune 500 companies can afford to do business. 

I recently received a package that came from Tuvalu (wow did Amazon set up a distribution center there?)

Turned out it was something I bought on eBay. The interesting thing was the tracking showed it was actually shipped from HongKong.

I sell things on eBay occasionally. I wonder if I can set up a Tuvalu postal account and drop the packages off at my local US postoffice? Wonder if what their rates are?

-------


-------

Tom, wb6b


jjpurdum
 

Tuvalu has a capital city with absolutely the neatest name of any city on the planet. It comes up on trivia tests from time-to-time because it's the first country to celebrate New Years.

Jack, W8TEE

On Tuesday, April 6, 2021, 9:15:37 PM EDT, Tom, wb6b <wb6b@...> wrote:


It makes sense for shipping rates to be reasonable. Lots of small businesses rely on it and, in any country, it helps their economy. Unless we want an economy where only fourtune 500 companies can afford to do business. 

I recently received a package that came from Tuvalu (wow did Amazon set up a distribution center there?)

Turned out it was something I bought on eBay. The interesting thing was the tracking showed it was actually shipped from HongKong.

I sell things on eBay occasionally. I wonder if I can set up a Tuvalu postal account and drop the packages off at my local US postoffice? Wonder if what their rates are?

-------


-------

Tom, wb6b


Tom, wb6b
 

On Tue, Apr 6, 2021 at 06:36 PM, jjpurdum wrote:
Tuvalu has a capital city with absolutely the neatest name of any city on the planet.
I looked that up. Yes, it is a fun name.

I wonder if I have to actually live there to get those postage rates. I think I'm packing up to go.

Tom, wb6b


Tom, wb6b
 

On Tue, Apr 6, 2021 at 01:38 PM, jjpurdum wrote:
The problem is that the Arduino (Atmel) family have not kept pace. The STM32 family was doing pretty well
I think where the Atmel/Microchip AVR chips still hold their place is in battery powered devices, because they can operate from a wide voltage range without needing any additional power wasting regulators. Also, they seem to have good resistances to voltage transients. 

Good thing about the Black Pills is there seems to be no phony clone chips yet available for the STM32F411, I believe they use. So you are likely to get the real deal.

But the Teensy sure shines in the benchmarks. They did a good job of selecting a chip, that is still affordable, for their boards that give their boards a genuine edge and reason to buy over the cheap boards.

Tom, wb6b


howard winwood G4GPF
 

Sorry! but you are wrong, VAT IS involved here in the UK, it is not a local tax, there are no tariff’s on goods under £135.

On 6 Apr 2021, at 22:30, Daniel Lavin <dan_ll@...> wrote:

It's the tariff, as well as shipping.  There is no VAT involved, but EBay does collect your local sales tax.


On 4/6/2021 4:59 PM, jjpurdum via groups.io wrote:
Worst type of tax Man ever devised.

Jack, W8TEE

On Tuesday, April 6, 2021, 4:44:34 PM EDT, howard winwood G4GPF <winwoodh@...> wrote:


prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


Virus-free. www.avg.com


Daniel Lavin <dan_ll@...>
 

I was overbroad--There is no VAT in the US.  Also, a couple of years ago, the US pulled out of a portion of an international postal convention that had allowed Chinese shippers to ship into the US without paying US postage. 

On 4/7/2021 4:57 AM, howard winwood G4GPF wrote:
Sorry! but you are wrong, VAT IS involved here in the UK, it is not a local tax, there are no tariff’s on goods under £135.

On 6 Apr 2021, at 22:30, Daniel Lavin <dan_ll@...> wrote:

It's the tariff, as well as shipping.  There is no VAT involved, but EBay does collect your local sales tax.


On 4/6/2021 4:59 PM, jjpurdum via groups.io wrote:
Worst type of tax Man ever devised.

Jack, W8TEE

On Tuesday, April 6, 2021, 4:44:34 PM EDT, howard winwood G4GPF <winwoodh@...> wrote:


prices going up may well be due to Ebay etc adding VAT to all Chinese/foreign sellers listings.

On 6 Apr 2021, at 21:03, Tom, wb6b <wb6b@...> wrote:

 I've noticed after this Coronavirus thing has extended in time many of the Chinese parts and boards are gradually going up in price. I wonder if this will provide some profit margin for the suppliers who want to supply better quality stuff, to do so and survive the race to the bottom cut throat price compilation. Long term these counterfeit suppliers will hurt the overall market for many eBay suppliers. Some or maybe even many, of them seem to be individual sellers just making a living for themselves.


Virus-free. www.avg.com