cancel
Showing results for 
Search instead for 
Did you mean: 

STLinkV2 cannot use to program STM32F030F4P6 board with STM32WS

AGUET
Associate II

Hi All,

I have a new board that I am trying to learn how to program.

I have connected my STLink to the device and using the STLink utility I was able to see it. Not understanding much what I see there BUT I was happy that I can do that.

I have started a project using STM32CubeMX to the board and set up Serial, Clock and the LED pin as output.

the I invoked STM32WS with the project I have created and added the code for the blink

  while (1)
  {
	  HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
	  HAL_Delay(150);
  }

When I try to RUN it I am getting the following Error:

Open On-Chip Debugger 0.10.0-dev-00011-g46c94c8 (2018-09-06-08:52)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 950 kHz
adapter_nsrst_delay: 100
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v32 API v2 VID 0x0483 PID 0x3748
Info : Target voltage: 3.204180
Info : STM32F030F4Px.cpu: hardware has 4 breakpoints, 2 watchpoints
adapter speed: 950 kHz
Error: timed out while waiting for target halted
TARGET: STM32F030F4Px.cpu - Not halted
in procedure 'program' 
in procedure 'reset' called at file "embedded:startup.tcl", line 490
in procedure 'ocd_bouncer'
 
** Unable to reset target **
shutdown command invoked

Is there something wrong with the configuration? I am sure there is BUT I can NOT point it out.

What does it mean adapter speed 950MHz? can I change the STLink Speed from the STM32WS app?

I would be happy if you can assist me.

Please let me know how can I move to the next level of developing this board.

Thank You!

Arye

3 REPLIES 3

950 KHz not MHz, it is the signalling rate on the SWD interface.

You've shown the interaction log, not the configuration. The CM0 doesn't support JTAG connectivity, only SWD

Perhaps look at preexisting examples for your platform, and test those?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AGUET
Associate II

Thanks Clive! :smiling_face_with_smiling_eyes:

My mistake regarding the Mhz I have pasted the log and it shows KHz.

This is my Configuration - I have selected it to be used and not being generated every time:

path:

A:\Arduino\Apps\Ac6\workspace\BlinkSTM32F030F4C6Test

Code:

# This is an BlinkSTM32F030F4C6Test board with a single STM32F030F4Px chip
#
# Generated by System Workbench for STM32
# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)
 
source [find interface/stlink-tcp.cfg]
 
set WORKAREASIZE 0x1000
 
transport select "hla_swd"
 
set CHIPNAME STM32F030F4Px
set BOARDNAME BlinkSTM32F030F4C6Test
 
# Enable debug when in low power modes
set ENABLE_LOW_POWER 1
 
# Stop Watchdog counters when halt
set STOP_WATCHDOG 1
 
# STlink Debug clock frequency
set CLOCK_FREQ 4000
 
# use hardware reset, connect under reset
# connect_assert_srst needed if low power mode application running (WFI...)
reset_config srst_only srst_nogate connect_assert_srst
set CONNECT_UNDER_RESET 1
 
source [find target/stm32f0x.cfg]

I have

transport select "hla_swd"

And I am not sure where I mentioned that I use JTAG? If I have configured it for JTAG I would be happy if you could let me know.

Thanks,

Arye

AGUET
Associate II

Just wanted to update:

I have managed to use Atollic TrueStudio to program this board with the same settings I have had using STM32CubeMX and the same main code mentioned in the main post. I also managed to upload HEX files from the projects folder into the board using the STM32 ST LInk Utility directly and it works every time. :ok_hand:

IMHO - I thing, The issue I have is only to do with SW for STM32 - Not sure what? I might be missing something and IT should work.

I would be happy to get assistance on that.

Thank You!

Arye