how to connect st-link to stm32f103c8t6 Topic is solved

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

how to connect st-link to stm32f103c8t6  Topic is solved

Postby ep.hobbyiest » Tue Feb 07, 2017 7:57 pm

Hi,
i have nucleoF401 board and stm32f103c8t6 board (which don't debugger).
I was trying to use nucleos debugger to stm32f103c8t6 board. I followed Nucleo's manual and connected to 4 wire connection to stm32f103c8t6 board.
3.3v, clk,sdi and ground wires are connected.

In chibistudio i took example of maplemini (which contain same controller).
And selected st_nucleo_f.cfg file to debug.

But no luck, it was not going further. any idea about connection.
Image

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: how to connect st-link to stm32f103c8t6

Postby Giovanni » Tue Feb 07, 2017 10:22 pm

Try to use the ST-Link utility and see if it is able to connect, if not then there is probably a wiring problem.

Giovanni

ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

Re: how to connect st-link to stm32f103c8t6

Postby ep.hobbyiest » Wed Feb 08, 2017 6:02 pm

I tried to connect it using st link tool, but still got error. Here are few snapshot i have attached.
Image Image Image

And here are the error messages of openOCD.

Code: Select all

Open On-Chip Debugger 0.10.0-dev-00371-g81631e4 (2016-09-18-00:02)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.259631
Error: init mode failed (unable to connect to the target)
in procedure 'init'
in procedure 'ocd_bouncer'


User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: how to connect st-link to stm32f103c8t6

Postby Giovanni » Wed Feb 08, 2017 6:52 pm

No clear idea, try checking wiring and target power.

Also try connecting while keeping the target under reset, there is an option in the stlink utility for this. The preloaded firmware could have reprogrammed the SWD pins.

Giovanni

ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

Re: how to connect st-link to stm32f103c8t6

Postby ep.hobbyiest » Sun Feb 12, 2017 8:33 am

yeah, may be possible. B'coz board is working fine with arduino.
And Also i tried with St-Link utility again, and its showing flashing successfully.

I flashed USB_CDC code in board.
But when i insert USB cable in usb port it is showing USB is not recognized.

And also,

Code: Select all

    systime_t time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 1000;
    palClearPad(GPIOC, 13);
    chThdSleepMilliseconds(time);
    palSetPad(GPIOC, 13);
    chThdSleepMilliseconds(time);

is not executing it seems. bcoz LED is not blinking.

Here is attached modified .ld file.
STM32F103c8t6.zip
(902 Bytes) Downloaded 336 times


I modified RT-STM32F103-MAPLEMINI demo project.

So, this means code is not working or it is flashed wrongly.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 48 guests