cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am trying to program STM32F103 MCU barebone. I attached it to LQFP 48 adaptor and made connections to Vcc, GND and clock as in Bluepill module. Using STMCUBE IDE For controlling RGB LED, the code has been debugged and unable to flash.

NU.2
Associate

Error:

Info : clock speed 1800 kHz

Error: init mode failed (unable to connect to the target)

in procedure 'init' 

in procedure 'ocd_bouncer'

I set high freq clock as ceramic resonator (used 8Mhz clock chipset) and with STLINK V2 debugger.

Please let me know the issue i am encountering. Thanks for your time:)

3 REPLIES 3
mattias norlander
ST Employee

We probably need more info about which pins of the F103 that you have connected which pins of the ST-LINK V2. Can you post a table of this? Vcc, Gnd and Clk is not enough. Assuming SWD, how about SWDIO? NRST?

LaurentL
ST Employee

Hi,

If you don't connect the reset line from the STLink, you have to avoid using the "connect under reset" strategy.

Try with reset none in debugger tab in debug config.

Or add the Reset connection and try without changing anything else.

Rgds,

Laurent

NU.2
Associate

Thanks!

I encountered couple of issues and it's finally ok now.

​>> First if all, my workspace had special characters in name (projects & design) and the software took it as "projects&". Got it fixed after changing this.

>> I wiped the MCU flash using STLink utility and programming it worked then on.

>> The MCU came with Blinky LED program and when I was trying to program, it got interference and failed to load. Attaching a reset switch and holding it for 5 seconds before uploading code worked.

Perfect!