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
chen
Associate II
Posted on April 01, 2014 at 16:13

Hi

''for the first time it got downloaded but problem occurs in the second time''

Have you, by chance, used the SWD pins for something in your program?

It sounds like the debugger cannot talk to the device because the SWD pins are used for something.

The only was to recover this is to force the device into the bootloader and erase the flash.

Download this software (I think it is this one) :

http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC1808/SS1767/PF257601?s_searchtype=keyword

Pull 'Boot0' pin high and use this program with USB cable and erase the device.

sanjib
Associate III
Posted on April 02, 2014 at 07:47

Hi

Thanks for the reply but I am using coocox ide how to add these downloade files in coococ ide as whicfh file to add in my coocox project and where I will get the pin in which file I should make high . Please explain elaborately as I am a new bie in stm2f030 please help.

Thanks in advance
sanjib
Associate III
Posted on April 02, 2014 at 07:54

here are two folders DFUDEMP and ST7DFUPRT as i am reaaly confused which folder files i should add or which not to add . it is really confusing please say from beginning which one to add which one to not

sanjib
Associate III
Posted on April 02, 2014 at 08:38

Sorry the problem is not like debugger is not able to talk to the device actually the problem is whenever I an downloading the code the LD2 pin which was onn it is getting off and error showing check cable connection

sanjib
Associate III
Posted on April 02, 2014 at 08:38

Sorry the problem is not like debugger is not able to talk to the device actually the problem is whenever I an downloading the code the LD2 pin which was onn it is getting off and error showing check cable connection

sanjib
Associate III
Posted on April 02, 2014 at 10:42

the error check cable connection is resolved by upgrading the st-link for USB and now the LED2 remain on when i dyumped the code but new error occurs

Error: Flash driver function execute timeout

     Erase:    [  0%]

how to solve it please help
chen
Associate II
Posted on April 02, 2014 at 10:47

Hi

''Thanks for the reply but I am using coocox ide how to add these downloade files in coococ ide''

You do not add them to CooCox.

The link was to a separate utility (DFU) which works over RS232, USB (and maybe some other protocols).

The Device Firmware Upgrade (DFU) utility allows you to do a download to the device without a debugger.

I suggested it so that you can erase your device and start again.

As I asked - Do the program use any of the SWD pins for any other purpose?

If it does - that is what is causing your loss of debugger connection.

''Error: Flash driver function execute timeout

     Erase:    [  0%]

how to solve it please help''

Use the DFU program I suggested to wipe the device.

sanjib
Associate III
Posted on April 02, 2014 at 13:58

but i anm not able to add DFU program in my coocox ide. How to do it in coocox ide all  c files starting with ._ like ._DFUDEMO.cpp how to add this please help

chen
Associate II
Posted on April 02, 2014 at 14:04

Hi

''but i anm not able to add DFU program in my coocox ide.''

The DFU I sent you the link for is a stand alone program.

It has nothing to do with CooCox.

Your original post asked - how do I download again, it has stopped working after the first download?

I suggested that it was your STM32 program that has disabled the connected between the debugger and the STM32.

While the existing STM32 program is executing in the STM32 - you cannot use the debugger.

I am suggesting that you use the stand alone DFU program to wipe the Flash memory in the STM32 so that you can start to use the debugger again.

''How to do it in coocox ide''

I do not know.

Ask the CooCox forum.