cancel
Showing results for 
Search instead for 
Did you mean: 

how do i program STM32C031G4U6 using stlinkv3minie

oyalç.1
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

4 REPLIES 4
STTwo-32
ST Employee

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

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.

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

AScha.3
Chief II

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 "Accept as Solution".

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.