How to flash without STLINK
Asked Answered
T

2

6

My STLINKV2 is not working anymore, not detected by Linux, it failed after the first successful flash. I ordered a new one but it will take 60+ days to arrive. Meanwhile I have heard on Youtube you can program Bluepills directly by connecting cut open USB cable to certain pins and then using a jumper. But I cannot get any precie information on this, is this really possible and how?

Torrens answered 27/2, 2020 at 23:10 Comment(2)
Here is one of those videos that mention flashing without the programmer: youtube.com/watch?v=1r_Pyyc_6e8Torrens
There are loads of STLINKV2 and V3 available for immediate dispatch on the web. Also you can use the STLINK on any Nucleo board as a stand alone STLINK (details available in the Nucleo documentation).Bandwagon
A
3

You should use the embedded bootloader. You can flash it through several interfaces. Look at AN2606, maybe you can find an already written flasher. Good luck STM32CubeProgrammer handle it.

If you intend to program it through usb, look also at AN3156 all protocols document are referred in chapter 2 of AN2606

Azedarach answered 28/2, 2020 at 7:48 Comment(0)
M
1

THOSE AREN'T CUT OPEN USB CABLES they are USB to serial adapters for arduino's bootloader usb serial cable

They connect them like this:stm blue pill programming

The problem is that this requires the Arduino STM32 bootloader to be flashed in it.

Another option will be to use STM32CubeProg this program allows you to program your stm over

  • Serial
  • SPI
  • I2C
  • USB

You'll need to set the BOOT0 and BOOT1 pins to the correct value (HIGH slash LOW) to allow it to go in flash mode during boot. Here is semi outdated tutorial which tells most of the steps to program a STM using serial. (the Flash Loader Demonstrator is outdated and you should use STM32CubeProg)

Maiden answered 29/2, 2020 at 16:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.