Skip to main content
g. lewis
Associate III
March 2, 2017
Question

F103C8T6

  • March 2, 2017
  • 5 replies
  • 1818 views
Posted on March 02, 2017 at 09:21

I encounter debug problems when trying  to make blink an LED of a board that include a STM32F103C8T6.

I set up the hardware firmware (GPIOs) with the program STM32CubeMx, and wrote two lines code to make the led blink:

      HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin);

      HAL_Delay(1000);

Simple.

Then I build the project which was ok

But when I tried to debug here is the error message I got:

0690X00000606RqQAI.png

Once I run it the console message is:

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

srst_only separate srst_nogate srst_open_drain connect_assert_srst

srst_only separate srst_nogate srst_open_drain connect_assert_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

Error: read version failed

in procedure 'program'

in procedure 'init' called at file ''embedded:startup.tcl'', line 473

in procedure 'ocd_bouncer'

** OpenOCD init failed **

shutdown command invoked

Any idea what could cause the problem?

Thanks

#stm32f103c8t6-blink-led
    This topic has been closed for replies.

    5 replies

    Technical Moderator
    March 2, 2017
    Posted on March 02, 2017 at 09:57

    Hi,

    You may refer to this

    https://community.st.com/0D50X00009XkddhSAB

    it may help you on your issue. You should check the ST-Link firmware version and your configuration GPIO toggled pin.

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    g. lewis
    g. lewisAuthor
    Associate III
    March 19, 2017
    Posted on March 19, 2017 at 10:37

    Hello,

    Ok, I updated my STLINK device using STM32 ST-LINK Utility.exe but now I got this message when running debug :

    Thanks0690X00000606Y4QAI.png

    Tesla DeLorean
    Guru
    March 20, 2017
    Posted on March 20, 2017 at 03:38

    This is likely something you'd need to discuss with the Ac6 SW-STM32 support people directly. Perhaps a driver issue?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    David Martins
    Senior
    March 29, 2017
    Posted on March 29, 2017 at 11:40

    I had a similar problem.

    See if this helps.

    1 -

    /external-link.jspa?url=http%3A%2F%2Fwww.openstmorg%2Ftiki-view_forum_thread.php%3FforumId%3D7%26comments_parentId%3D4785%23threadId7

    2 -

    /external-link.jspa?url=http%3A%2F%2Fwww.eevblog.com%2Fforum%2Fmicrocontrollers%2Fdebug-problems-with-stm32f030%2Fmsg1172575%2F%23msg1172575

    g. lewis
    g. lewisAuthor
    Associate III
    March 30, 2017
    Posted on March 30, 2017 at 12:44

    Ok it seems to be working now. I had to write the code: (  -c 'reset_config none' ) under openocd option int the debug configuration since my board doesn't include the hardware reset that is not connected to STlink.

    Thanks you all.

    g. lewis
    g. lewisAuthor
    Associate III
    April 24, 2017
    Posted on April 24, 2017 at 09:39

    Now I'm trying to set the semihosting mode to be able to use printf and scanf fonction and the results on the openOCD console of the SW4STM32 IDE.

    On the nucleo boards I have no diffuclty to make it work but on this type of  board where you have to hook up an external third party stlink module it doesn't work.

    I'm using the procedure for semihosting described on the help contents and SystemWorkbench for STM32/Advanced/Semihosting.

    addd:   -c ''reset_config none''  - under openocd option int the debug configuration

    And now at the debug mdoe I got this error:

    0690X00000606rtQAA.png

    Thanks for your help.

    g. lewis
    g. lewisAuthor
    Associate III
    April 25, 2017
    Posted on April 25, 2017 at 09:43

    Oddly when I run for debug a simple Blink code I don't have errors but when using semihosting the error showes up!

    Maybe something related to debug device or interface du to the third party stlink device?