cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout during flash programming

timon1994
Associate II
Posted on June 10, 2012 at 19:46

Hello!

Hope you can help me to fix my problem.

St-Link didnt see STM32F4 Discovery, but I've tried[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/DispForm.aspx?ID=1944&RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/STM32F4DISCOVERY Cannot connect to the MCU device&Source=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder%3D/public/STe2ecommunities/mcu/Lists/STM32Discovery/STM32F4DISCOVERY%2520%2520%2520Cannot%2520connect%2520to%2520the%2520MCU%2520device%26FolderCTID%3D0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F%26TopicsView%3Dhttps://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/AllItems.aspx%26currentviews%3D376] this patch and now StLink utility connects to my board.

But now I've got an error message: Timeout during flash programming.

What should I do?

Thanks in advance.

#st-link-utility
14 REPLIES 14
timon1994
Associate II
Posted on June 11, 2012 at 12:35

Now I've got this error message:

Failure running flash loader.

And Flash size is unknown, as you can see on attached screenshot.

________________

Attachments :

error.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzza&d=%2Fa%2F0X0000000bSx%2FiA2QI6SxKy.ZZmkl0o_y6D1Xd4KmWeAX4EGtxs3Mh5g&asPdf=false
lastsamurai
Associate III
Posted on June 11, 2012 at 12:50

Seems like an issue with Drivers.  A re-installation of drivers may be a good idea.  And just try to load an example project.

frankmeyer9
Associate II
Posted on June 11, 2012 at 13:20

Could it be a power supply issue ?

The controller consumes significantly more power during flashing.

I would try with an external power supply, and/or watch Vdd during flashing.

timon1994
Associate II
Posted on June 11, 2012 at 15:35

Reinstalling drivers didn't help.

I'm waiting for fm's post.

Why the flash size is unknown?
frankmeyer9
Associate II
Posted on June 11, 2012 at 16:06

I never had such an issue with several F4 discovery boards.

If the application (ST Link utility in this case) can make contact with the board, it does not seem to be a driver issue.

The stm32f4 takes some more current than the F1, L1 and F0 boards, at full speed more than the basic 100mA of the USB power. That's why I assume a power problem.

Especially erasing/writing to flash increases the power consumption considerably, because internally a voltage of 9..12V is required, which is generated by aninternal booster stage from Vdd.

If you have no scope or external power supply for your board, try another USB port, another PC, another USB cable or another discovery board as quick fix.

timon1994
Associate II
Posted on June 11, 2012 at 16:36

I've tried it on another computer, it doesn't work. The same error and flash size is unknown.

I cannot try another board because in our city only one shop sells it, and my board was the last.

When I bought my board I've tried some examples and it worked perfectly.

frankmeyer9
Associate II
Posted on June 11, 2012 at 16:59

When I bought my board I've tried some examples and it worked perfectly.

I assumed it never worked without errors...

So there is a good chance your (last) application is causing this trouble.

Have you tried to get the board into Bootloader mode ?

It is described in the Discovery board's User Guide, and the according uC functionality in the stm32f4 reference manual.

I had not yet messed up my boards that way, so I can't speak of own experience, but there are other threads on this forum about this topic.

timon1994
Associate II
Posted on June 11, 2012 at 18:31

I've managed to upload demo firmware to my board using bootloader. It works ok, but I still cannot upload it using St-Link utility, having the same troubles.

Of course I can load it using bootloader but it is too slow: I must connect usb-micro, set the jumpers... 

What can I do?(

frankmeyer9
Associate II
Posted on June 11, 2012 at 19:53

Assuming you neither changed the settings of the jumpers and solder bridges, nor have somehow physically damaged the board, I'm running out of ideas.

I've managed to upload demo firmware to my board using bootloader. It works ok, but I still cannot upload it using St-Link utility, having the same troubles.

 

Sounds like you have used only the ST-Link utility up to now.

Did you try to access the board with a toolchain like Keil, IAR, CoIDE, etc. ?

They use the SWD interface, which are different lines.