2024-01-06 01:08 AM
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?
Solved! Go to Solution.
2024-01-06 02:15 AM
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.
2024-01-06 01:41 AM
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.
2024-01-06 01:49 AM
Thank you. I have 1 question do I need the crystal oscillator when programming because i would love to use that pin for gpio.
2024-01-06 01:54 AM - edited 2024-01-06 02:01 AM
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 ! )
2024-01-06 02:15 AM
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.