[solved] STM32-E407 cannot flash via SWD ST-Link

Started by tankslappa, November 05, 2015, 02:10:27 PM

Previous topic - Next topic

tankslappa

Hi All,

I wonder if anyone can give me some advice... I'm very new at working with ARM MCUs (although I do have experience with ATmegas). So don't assume I haven't done something stupid, although I have tried not to!

I recently bought an ST Nucleo-F103RB, and have played about with that, using the built in ST-Link's drag and drop to put .bin files onto the STM32F103... All fine, no shockers.

I then tried to use the ST-Link part of the Nucleo board (I removed the 2 jumpers to isolate the ST-Link part of the board from the Nucleo) to program a new Olimex STM32-E407 with a simple LED blink test via JTAG connector via wandering leads...
SWD 1 VCC - JTAG 1
SWD 2 CLK - JTAG 9
SWD 3 GND - JTAG 20
SWD 4 DIO - JTAG 7
SWD 5 RST - JTAG 15

I've obviously done something to the F407 chip as the LED (which is turned on by default with its shipped code) is now off, but it doesn't blink. I've tried disconnecting the SWD wires, pressing reset... Nothing. I even bought a second Olimex STM32-E407 and tried that, it did the same. I sent the .bin to an internet contact with an Olimex-STM32E407 and he flashed it and confirmed the LED did flash on his board, although I'm not sure of his upload method, he may have a full JTAG interface.

I tried initially via the drag and drop ST-link drive interface on the first board, and now I'm trying the ST-Link utility. The second board has always been via the ST-Link Utility.

ST-Link Utility connects and shows "Device family :STM32F40xx/F41xx", so it's connecting to the Olimex board. It verifies my bin file is on the chip. The MCU-Core info is however static. With the default shipped code, I could see the registers changing when I pressed step, but once I've attempted to flash my .bin, everything stops. Disconnecting the SWD cables, pressing the reset button, nothing will make the LED flash.

Before I flashed the second board, I saved its default memory contents in the hope I could do a restore onto one (or both) of the E407 boards... Unfortunately that doesn't resurrect them either.

The ST-Link firmware is the latest - V2.J24.M11 STM32 Debug+Mass storage

Both boards have the Boot links set to the outside pads (as shipped). I believe this is B0_0 and B1_0, but the STM32-E407 Rev.E screen printing is incorrect!
Both boards are being powered via the USB nearest the DC socket, with the power jumper set to the 3rd position in.

For some reason, attempting to upload via my SWD connection puts STM32E407 boards into a coma. Apparently permanently.

I'm really at a complete loss!

tankslappa

Just an update... Problem solved...

Chibios's default library for the STM32E407 board is the old one, with the old PHY...

After obtaining a JTAG interface and getting the full debug environment working, I was able to see exactly where the code was stopping (or more accurately, going into a while true {} loop).