cancel
Showing results for 
Search instead for 
Did you mean: 

Programming external application with stm32 Discovery

azayetey
Associate II
Posted on August 23, 2015 at 17:32

Hello,

I'm trying to program an external prototype board that I made using the same MCU as on the Discovery (stm32f407VG) and am getting the following error:

Error: Flash driver function execute timeout

     Erase:    [  0%]

I have tried searching for this and found similar topics but could not find helpful advice.

I use coocox to program the Discovery and it works fine but it fails to program the external application. Here is how I have it wired up:

All the VDD pins to 3v from the discovery , all the VSS to GND (including VDDA and VSSA) , the VCAP1 and VCAP2 connected to VSS through 2.4uf caps .The SW CLK and SW IO pins to PA14 and PA13 and the NRST pin (without pullups). 

I removed the  CN3 jumpers on the discovery of course.

Can someone please give me some advice on what to do here? I've been trying to get it to run for the past 4 days now with no success.  Thanks in advance.

I'm using CooIDE. I tried CoFlash , doesn't work either.
4 REPLIES 4
Posted on August 23, 2015 at 18:07

What voltages do you measure on the VCAP and NRESET(NRST) pins?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
azayetey
Associate II
Posted on August 23, 2015 at 18:48

I probed the VCAP pins. Both are at about 1.3Volts. I probed the NRST. It's at 3 volts.

Here is the interesting part. When my oscilloscope probe is connected to the NRST then the programm is successfully uploaded. When I disconnect it the it fails with timeout as I said above. Do I need to give it a pullup/down?

Edit:

I added a capacitor from NRST to VSS and it seems to be working fine

Posted on August 23, 2015 at 19:13

I'd put a pull-up on it, 10K would be fine. Pull-down on BOOT0 and BOOT1

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
azayetey
Associate II
Posted on August 23, 2015 at 20:05

This is very strange. I did what you said but there are still issues. It only programs when I short the top left corner of the breakout board (about pins73-79 with vss and vdd there aswell) almost everytime. If I don't touch that part with my finger then it gives me an error. What is going on? Is there anything else that I have to pullup/down for it to work properly? Do the SW CLK and SW IO need pullups/down?