Skip to main content
oyalç.1
Associate III
January 6, 2024
Solved

how do i program STM32C031G4U6 using stlinkv3minie

  • January 6, 2024
  • 4 replies
  • 1700 views

i have 3 STM32C031G4U6 microcontroller i bought from digikey. no matter what i do i can not program them. i tried a cheap stlink v2 clone as well as stlinkv3minie. i have the swdio, swclk and nrst connected to the microcontroller. 

no matter what i do neither cubeide or cubeprogrammer recognize the microcontrollers but i can update the software on the stlink itself. 

it just says no device on target. what am i doing wrong?

This topic has been closed for replies.
Best answer by STTwo-32

No, you don't need a crystal oscilator. You can use the High-speed internal (HSI48).

Best Regards.

STTwo-32 

4 replies

STTwo-32
ST Technical Moderator
January 6, 2024

Hello @oyalç.1 and welcome to the ST Community :smiling_face_with_smiling_eyes:.

I suggest you check the chapter 4 "Debug management"  and chapter 6 "Reference design" of the AN5673 to understand more about programming and debug the STM32C0 series. 

PS: Don't forget also to make sure that you are using a USB cable that is able to transfer data (not just a charging cable) and try using a different USB port on your PC . Also, don't forget to Refresh to get your ST-LINK serial and try to connection on Cube Programmer on different modes.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
oyalç.1
oyalç.1Author
Associate III
January 6, 2024

Thank you. I have 1 question do I need the crystal oscillator when programming because i would love to use that pin for gpio.

STTwo-32
STTwo-32Best answer
ST Technical Moderator
January 6, 2024

No, you don't need a crystal oscilator. You can use the High-speed internal (HSI48).

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
AScha.3
Super User
January 6, 2024

try: use cubeprogrammer ; connect with cheap stlink v2 clone -> response ok ? (no device on target..)

then connect gnd, vcc 3V3 , swd, swc to your STM32C031G4U6 board, (mode: software reset);

on your board (which board? selfmade ? ) boot0/PA14 to gnd , reset/PF2 open(unconnected) ;

then try connect...

(If using the stlinkv3minie, its more complex: you have to connect gnd, vcc 3V3 , swd, swc, nrst AND supply your board by extra 3v3 supply ! )

If you feel a post has answered your question, please click on " Best Answer ".