2014-02-22 05:31 AM
I used the discovery kit to prototype a control-board. The self developed board using the stm32F4 MPU works well. Thus far i flashed it with the st link debugger that is integrated into the kit, which worked fine. Now i've bought a st-link standalone debugger and tried to flash with it. Sadly the IDE throws the Error: ''Flash driver function execute error''. I upgraded the St-Link to the newest firmware, but that didn't help.
To verify that nothing wrong with my self-developed board i tried to flash the Discovery Board with the external ST-LINK (Jumper for internal ST-LINK pulled of, and the external ST-Link connected to these PINs; GND, and RST also connected), the error stayed the same ...Is the St-Link i got broken, or am i doing somthing wrong?2014-02-24 03:10 PM
You're doing something wrong. I just went through this. The onboard ST-Link module can either program the onboard processor or, by removing the jumpers, program an offboard processor.
If you want to use an external ST-Link to program your onboard processor, you have to pull SB3,5,7,9,11, and 12. This will isolate the onboard processor from the onboard ST-Link. Then, you need to wire: STLINK P1/P2 ---------------------------------------- 1 (VAPP) +3V 3 (GND) GND 7 (SWDIO) PA13 9 (SWCLK) PA14 15 (NRST) NRST Pin 1 on the ST-Link is the pin on the 20 pin header closest to the designator CN3. As with all IDC 2x headers, the numbering is 1 2 3 4 5 6 7 8 and so on. In this case 1 is on the side with the notch, and the pins are beside each other 1,3,5,7,9,11,13,15,17, and 19. I have used this setup for a few days now, along with Eclipse, OpenOCD, and GCC, to program my ST32F4Discovery board with the RTEMS RTOS. I think it may actually be faster than the onboard ST-Link, but I could be hallucinating.2014-02-24 11:48 PM
Is the St-Link i got broken, or am i doing somthing wrong?
I hope you realized that the standalone version of the st-link defaults to JTAG, not SWD. Have you checked this in the settings of your flashing software ? Since you connect only the SWD wires, you might need to change this to SWD.