cancel
Showing results for 
Search instead for 
Did you mean: 

ST link error

LACTIC
Associate II

Hello Team,

I am using System Workbench for coding of STM32f30xx series micro-controller.I m getting some error on regarding St-link match frequency , that is below:-

Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48)

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: 8000 kHz

adapter_nsrst_delay: 100

Info : clock speed 8000 kHz

Info : STLINK v2.1 JTAG v29 API v2 M18 VID 0x0483 PID 0x374B

Info : using stlink api v2

Info : Target voltage: 2.915101

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Stlink adapter speed set to 4000 kHz

Info : STM32F303VCTx.cpu: hardware has 6 breakpoints, 4 watchpoints

Info : Listening on port 3333 for gdb connections

target halted due to debug-request, current mode: Thread 

xPSR: 0x01000000 pc: 0x080005c4 msp: 0x2000a000

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Stlink adapter speed set to 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

adapter speed: 4000 kHz

** Programming Started **

auto erase enabled

Error: Invalid command argument

image.base_address option value ('button.elf///') is not valid

embedded:startup.tcl:476: Error: ** Programming Failed **

in procedure 'program' 

in procedure 'program_error' called at file "embedded:startup.tcl", line 535

at file "embedded:startup.tcl", line 476

Due to this micro-controller can't burned with my code, how to set this frequency?

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

You do not actually show, what comman is given to the controller. So showing your user program does not help. You must dig deeper. Or perhaps try some example from a tutorial first, if you find such a tutorial. If something in a chain does not work, you have to break up the chain into smaller units.

View solution in original post

4 REPLIES 4
Uwe Bonnes
Principal III

The error is not related to the interface speed. You do not show the command line used. I guess, you try to upload some invalid file, e.g. some C-file.

LACTIC
Associate II

Thank you to reply actually i am using System workbench IDE so when I give command to flash the micro controller then it is showing such error.

I will share you screen shot of it.

Below is my code:-

/**

 ******************************************************************************

 * @file  main.c

 * @author Ac6

 * @version V1.0

 * @date  01-APRIL-2020

 * @brief  Default main function.

 ******************************************************************************

*/

#include "stm32f30x.h"

#include "stm32f3_discovery.h"

int main(void)

{

GPIO_InitTypeDef    GPIO_InitStructure;

RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOE,ENABLE);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9|GPIO_Pin_8|GPIO_Pin_12;

GPIO_InitStructure.GPIO_Mode= GPIO_Mode_OUT;

GPIO_InitStructure.GPIO_OType= GPIO_OType_PP;

GPIO_InitStructure.GPIO_PuPd= GPIO_PuPd_NOPULL;

GPIO_InitStructure.GPIO_Speed= GPIO_Speed_50MHz;

GPIO_Init(GPIOE,&GPIO_InitStructure);

RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,ENABLE);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;

GPIO_InitStructure.GPIO_Mode= GPIO_Mode_IN;

GPIO_InitStructure.GPIO_OType= GPIO_OType_PP;

GPIO_InitStructure.GPIO_PuPd= GPIO_PuPd_DOWN;

GPIO_InitStructure.GPIO_Speed= GPIO_Speed_50MHz;

GPIO_Init(GPIOA,&GPIO_InitStructure);

for(;;)

{

GPIO_SetBits(GPIOE,GPIO_Pin_12);

if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0))

{

GPIO_ResetBits(GPIOE,GPIO_Pin_9);

GPIO_SetBits(GPIOE,GPIO_Pin_8);

}

else

{

GPIO_ResetBits(GPIOE,GPIO_Pin_8);

GPIO_SetBits(GPIOE,GPIO_Pin_9);

}

}

}

In attachment highlighted area is by which I will flash my program into MCU.

Uwe Bonnes
Principal III

You do not actually show, what comman is given to the controller. So showing your user program does not help. You must dig deeper. Or perhaps try some example from a tutorial first, if you find such a tutorial. If something in a chain does not work, you have to break up the chain into smaller units.

LACTIC
Associate II

ok, I will try do this thing.