cancel
Showing results for 
Search instead for 
Did you mean: 

problem in downloading program inflash

sanjib
Associate III
Posted on April 01, 2014 at 14:33

I have a new stm32f030r8t6 board . i am having problem in downloading code to the flash . for the first time it got downloaded but problem occurs in the second time . error

 connect failed check cable connection
40 REPLIES 40
frankmeyer9
Associate II
Posted on April 03, 2014 at 13:16

The problem is - you can't.

The STLink can't get access to the target, either because the SWD pins are reconfigured, or is in a sleep mode. You can use USB to power the board, but don't start your toolchain/debugger. The system bootloader / UART/ Flash Loader Demonstrator are bypassing the STLink, accessing the MCU directly.

It would look more like this:

1.) Disconnect your board from usb or other voltage supply.

2.) Connect the BOOT0 Pin with High (3V).

3.) Plugin power/usb cable again.

4.) Start the Flash Loader Demonstrator software, doing a Flash Mass Erase.

5.) Disconnect the usb again.

6.) Disconnect the BOOT0 from High (3V).

7.) Plugin the USB, and check if the board works normal again.

8.) Investigate the code you flashed last time, as it is presumably the source of your trouble.

sanjib
Associate III
Posted on April 03, 2014 at 13:33

Thanks for your patience I tried but when I starting flash loader demonstrator by preeing next after checking the uart and entering other data like parity, baudrate i amgetting error as given below

''No response from the target the boot loader cannot be started. Please verify the boot mode configuration and theflash  protection status. Reset your device and then try again.
sanjib
Associate III
Posted on April 03, 2014 at 13:34

this thing is really screwing my head . Please suggest something

frankmeyer9
Associate II
Posted on April 03, 2014 at 14:42

AN2606, ''STM32 microcontroller system memory boot mode'' (file name CD00167594.PDF) suggests: 8 bits, even parity, 1 stop bit

The system bootloader uses an auto-baudrate detection, everthing between 1200 bps and 115200 should be fine. I would choose 9600 or 19200 bps.

What about the application program you flashed to it - is it expected to show any signs of life, such as changing states on GPIOs ?

If so, I would check this with a scope, to prove it had not been killed in the process.

sanjib
Associate III
Posted on April 03, 2014 at 15:03

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6o2&d=%2Fa%2F0X0000000bvr%2FEkPtOBRazrcddxK1woCfobaHmgMN0pb23auD98AyWdQ&asPdf=false
Posted on April 03, 2014 at 15:31

The system bootloader uses an auto-baudrate detection, everything between 1200 bps and 115200 should be fine. I would choose 9600 or 19200 bps.

I does however expect Even Partity, 9600 8E1 is a good starting point.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on April 03, 2014 at 16:05

still giving the same error

No response from the target the boot loader cannot be started. Please verify the boot mode configuration and theflash protection status. Reset your device and then try again.

0690X0000060Mo2QAE.gif

Please help i need to solve this issue as fast as possible

frankmeyer9
Associate II
Posted on April 03, 2014 at 16:48

I ran out of ideas now.

You can try with a second board, if you have one available.

At first glance, your code snipped looks rather suspicious:

 

  * <h2><center>&copy; COPYRIGHT

2010

STMicroelectronics</center></h2>

 

  */

 

 

/* Includes ------------------------------------------------------------------*/

 

#include <stm32f0xx.h>

 

#include ''stm32f0xx_adc.h''

 

#include ''stm32f0xx_gpio.h''

 

#include ''stm32f0xx_rcc.h''

 

#include ''stm32f0xx_usart.h''

 

#include <stm32f0xx_syscfg.h>

 

#include ''stm32f0xx_rcc.h''

 

#include ''stm32f0xx_pwr.h''

 

//#include ''stm32f0xx_discovery.h''

 

 

...

 

 

  /*!< At this stage the microcontroller clock setting is already configured,

 

       this is done through SystemInit() function which is called from startup

 

       file (startup_stm

32f10x_xx

.s) before to branch to application main.

 

       To reconfigure the default setting of SystemInit() function, refer to

 

       system_

stm32f10x

.c file

 

     */

 

 

...

 

 

#ifndef USE_

STM3210

C_EVAL

Is it really for the F030 ???

sanjib
Associate III
Posted on April 03, 2014 at 17:00

yes . please say me how to solve my issue so that i can download code into flash through coocox.

Posted on April 03, 2014 at 17:05

Please help i need to solve this issue as fast as possible

You're connecting the board up how? USART1 PA9/PA10, signals suitably converted to a PC USB/Serial adapter? If the Flash Loader Demonstrator doesn't work, your next step would be to try sending the 0x7F byte in a terminal app, and observing if the 0x79 response occurs.

Also with the board booted with BOOT0 High should be erasable in the ST-LINK Utilities.

Thread has very little detail of the board design, and connectivity.

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