2020-04-29 08:09 AM
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?
Solved! Go to Solution.
2020-04-30 02:11 AM
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.
2020-04-29 01:11 PM
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.
2020-04-29 11:09 PM
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.
2020-04-30 02:11 AM
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.
2020-04-30 05:09 AM
ok, I will try do this thing.