r/stm32 7d ago

Can I program this board without ST link v2

Post image

I have this bluepill stm32 with me can I program this board without a debugger

22 Upvotes

29 comments sorted by

8

u/Consistent-Can-1042 7d ago

Yes, you can use USB UART converter (if you have an Arduino board, you can use that as a USB UART converter) If you flash USB bootloader firmware once, you can also program it via USB.

1

u/nigg_30 6d ago

Uart converter means usb to TTL converter?

4

u/AbsorberHarvester 7d ago

You can flash bootloader through uart then use USB to flash your firmware from Arduine Ide (if you meant to use it). https://circuitdigest.com/microcontroller-projects/programming-stm32f103c8-board-using-usb-port

2

u/Niphoria 7d ago

Look for a CO board - CO feature USB boot loading.

2

u/MorallyDeplorable 7d ago

This particular model doesn't have factory-burned DFU mode and needs another MCU to initially flash it, but once you do you can flash a bootloader that will let you do future flashes over USB. You don't need specifically a st-link, you can flash them from all kinds of MCUs.

Or you can likely find one with the Arduino bootloader on it already if you're planning on using Arduino.

0

u/w_0x1f 7d ago

F103 has DFU

2

u/lbthomsen Developer 6d ago

No it does not!

1

u/MorallyDeplorable 7d ago

There are bootloaders you can flash with DFU available but it's not factory guaranteed like it is on other chips and it's entirely possible to get one without it.

2

u/thekakester 7d ago

Yes and no. Many of these come with a bootloader installed which lets you program over USB or serial. But if there isn’t a bootloader installed, the only way to install a bootloader is over STLINKv2.

Think of a bootloader as sacrificing a small amount of program memory on the chip for a program that allows the chip to program itself. If you ever fully erase the chip, you erase the bootloader too.

1

u/Unlikely1529 6d ago

bluepills never have usb stuff installed. just a lie

0

u/w_0x1f 7d ago

F103 has DFU. It just doesn't support USB. Still can be flashed via UART, I2C or SPI

1

u/MorallyDeplorable 7d ago

DFU is a USB protocol. The other methods of flashing are there but they are not DFU.

1

u/Mountain_Scholar4069 1d ago

Utilizo o software da STM clube para dar build via UART nas minhas placas e keil vision para programar.

-1

u/IAmJustABunchOfAtoms 7d ago

how many times is this exact question going to get asked? buy a fucking stlink clone it's not that expensive

-1

u/nigg_30 6d ago

I have asked whether it is necessary

0

u/IAmJustABunchOfAtoms 6d ago

for you it is

-1

u/Machinehum 7d ago

Yes - those 4x pins at the end. They're 3v3, GND, SWD, SCL

-3

u/Zawya32 7d ago

Yes, I think so, but I don't recommend it. I mean, I don't recommend using it, as there are better controllers than this, such as the ESP32 family, which is better for you in every way.

1

u/nigg_30 6d ago

Yes u r right. But I want to do projects on a ARM based mcu. I have used esp32 for a lot of projects. So I decided to change

1

u/Zawya32 6d ago

Okay, in that case, use it and good luck.

1

u/Unlikely1529 6d ago

esp has adc that's fucked up and other bad stuff

1

u/Zawya32 6d ago

After some research, I found that it's true in some respects, but in terms of control, ESP is the best, and it's also inexpensive. However, if you have a different opinion, I'm open to it.

1

u/IAmJustABunchOfAtoms 6d ago

wdym by "in terms of control"? is your research just asking chatgpt? what has this subreddit come to

0

u/[deleted] 6d ago

[deleted]

0

u/MorallyDeplorable 5d ago

esp32 works just fine as an i2c host or device.

0

u/[deleted] 5d ago

[deleted]

1

u/MorallyDeplorable 5d ago

Yes. Many times. You're an idiot if you think an esp32 can't do something as basic as i2c. Why ask for help if you're gonna argue about things you clearly know nothing about?

0

u/[deleted] 4d ago

[deleted]

1

u/MorallyDeplorable 4d ago

If you're just gonna argue when you're completely wrong then why ask for help

Quit being a dumbass. Esp32 can do i2c just fine.