cancel
Showing results for 
Search instead for 
Did you mean: 

F103C8T6

g. lewis
Associate II
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
9 REPLIES 9
Imen.D
ST Employee
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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
g. lewis
Associate II
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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 28, 2017 at 11:26

Hello Lewis,

For debug purpose, could you locate the 'openocd.exe' file (it should be somewhere under your $HOME/.p2 directory).

Could you launch it manualy in a command shell ?

This to be sure you do not have some executable right issue.

Could you share the path name of your openocd tool ?

Kind regards

Sirma

David Martins
Senior
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

Posted on March 29, 2017 at 14:47

Hi Sirma,

Yes I launch it manually on command prompt using CMD on windows 10.

Here is what it returns:

0690X00000606eaQAA.png

It says ''can't find openocd.cfg''

the path name is:

C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.openocd.win32_1.13.1.201703061523\tools\openocd\bin

Thanks

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
Associate II
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
Associate II
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?