cancel
Showing results for 
Search instead for 
Did you mean: 

Error Flash download failed - ''Cortex M4''

hans2006dampf
Associate II
Posted on July 18, 2014 at 12:14

Hello,

I´m doing my bachelor thesis at the moment by designing a hardware with a microcontroller. I´m using a self made board with the STM32F407ZG microcontroller. My board has a JTAG adapter for programming. All the other components which are required for reset an so on are placed in the same way like on the STM32F4 Eval board of ST. I´m using keil uvision 5 and a Ulink2 adapter.

After I finished my board I tryed to flash it with a programm which is working on an eval-board, but it just worked the first time I tryed it with no errors. Since then I can´t operate anytime with my board. If I try to flash it always brings a timeout error.which says ''Flash timeout. Reset the target and try it again''.

So my question is if there is a way to set the microcontroller back to the factory settings, by an external setup.

thanks for any help

7 REPLIES 7
Posted on July 18, 2014 at 14:29

Pull BOOT0 High and reset, this will start the part from the System Loader in ROM rather than running broken user code in FLASH. Erase the flash, using ST-LINK Utilities, or whatever.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hans2006dampf
Associate II
Posted on July 18, 2014 at 19:19

Thank you. I´ll try that tomorrow morning.

hans2006dampf
Associate II
Posted on July 19, 2014 at 09:53

Full chip erase was done but flash download failed. It always stops at the address 08000000H. Then the timeout message appears.

Do you know which voltage level needs to be on pins which are not in use. Do they need to have a definite level or not in case the microcontroller is not flashed an if it´s flashed.

An an pther question is, there a possibility to test the microcontroller. Let´s say I put a signal on one pin and the microcontoller gives an acknowledge somehow.

Thank you!

Posted on July 19, 2014 at 14:57

So did it ever work?

You must have all the supply pins wired up, including the analogue ones. Check the states of NRESET/NRST and BOOTx. Check you have both VCAP pins attached to a capacitor, and that you can see 1.2V on them.

The secondary method to confirm signs-of-life is to pull BOOT0 High, reset into the System Loader, and then hook up a serial port to USART1 or USART3 (CMOS not RS232) and then at 9600 8E1 send an 0x7F character, and observe if you can see a 0x79 response.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hans2006dampf
Associate II
Posted on July 21, 2014 at 19:56

After I finished the board I flashed it, and I think it did work the first time but not too sure about it, because when I tryed debugging it didn´t work. The Program I flshed is working properly on an other eval board.

But I´ve got all the voltage levels on the supply pins and also the boot, reset and Vcap pins.

My board just has a JATG Interface ato programm the Microcontroller. And also the two CAN´s, ADC pins and DAC pins are connected. And I put a micro SD socket on the board.

 I can´t find the error with the JTAG connection, because all the appropriate pin of the microcontroller a connected with the JATG interface. In the same way as on the eval board, which is working.

I suppose the microcontroller might be broken!!!

If got no other idea!
Posted on July 21, 2014 at 20:03

Yeah, I don't have much to work with here.

Classic failures when the underlying design is correct tend to fall into solder issues (shorts, opens), or correct orientation of the part. The latter seems unlikely if you can see 1.2V on the VCAP pins.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hans2006dampf
Associate II
Posted on July 22, 2014 at 21:46

Tahnks a lot so far.

I just have to more questions?

What is the PDR_ON pin for and how does it need to be connected. In my circuit it´s connected to VDD. Does it have anything to do with a wake up function.

And whats the TMS pin of the JTAG Interface for. In the datasheet it´s said that it is used to switch between JTAG-DP and SW-DP. Do I need to specify something in the Keil environment, or is it done by selecting JTAG as interface.

Thanks