2014-07-18 03:14 AM
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 help2014-07-18 05:29 AM
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.
2014-07-18 10:19 AM
Thank you. I´ll try that tomorrow morning.
2014-07-19 12:53 AM
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!2014-07-19 05:57 AM
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.2014-07-21 10:56 AM
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!2014-07-21 11:03 AM
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.2014-07-22 12:46 PM
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