cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link Connection error�

amedm
Associate II
Posted on November 07, 2012 at 15:20

I'm a student of University of Catania and I'm using IAR Embedded Workbench for ARM, v. 6.21, 32K Kickstart Edition on WIndows 7, for an university project to program a STM32F100XB board (using SWD Interface)

It worked all but a day, trying to flash a program it gave me the following errors:

- Fatal error: ST-Link Connection error Session aborted!

- Failed to load flash loader: C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\config\flashloader\ST\FlashSTM32F10xxxRAM6K.out

- Failed to load flash loader: C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\config\flashloader\ST\FlashSTM32F100xB.flash

Can you help me undestanding why and fixing it?

Thank you,

Best Regards

Amedeo Merlo

Edit: Stm32vl discovery board

#stm32f100 #stm32-st-link-swd
10 REPLIES 10
Posted on November 07, 2012 at 15:26

Wrong driver, board not powered?

Does it work with more professional JTAG/SWD pods?

What board, exactly? A Google of the name just brings up the Part# of the chip, which isn't much help.

If the board is running broken code the ST-LINK might not be able to wrestle control. Power the board up with BOOT0 High so it executes the System Loader.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
amedm
Associate II
Posted on November 07, 2012 at 15:34

It worked well with my code before yesterday. The board is stm32vl discovery. i'm a starter with mcu board, I did the tutorial to configure IAR, the example and then flashed my code and it worked. After a modify it didn't work anymore. Maybe it's a stupid question but which is the boot 0?

Thank for the fast answer 🙂

Posted on November 07, 2012 at 16:39

BOOT0 is a pin on the chip in question.

On the VL-Discovery board it's the sixth pin down on the right hand side marked ''Boot'', review the schematic for exact connectivity on the board.

Disconnect board, then use a jumper wire, or micro grippers to connect it to 3V3 on the other side (third pin down), then reconnect the USB.

Code which does DMA, WFI/WFE, Remapping GPIO used by SWD/JTAG and some other things close to the entry to the ResetHandler, can cause the device to be inaccessible to certain debuggers. Using BOOT0 you can place the device in System Loader mode, which is a safe harbour from which to erase the device and program new code.

If this fixes the board, examine carefully your code, and understand to execution/flow of the first 10,000 or so cycles. Put it a delay loop, or wait for a button press, before entering new/critical code.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
amedm
Associate II
Posted on November 07, 2012 at 17:43

I connected 3v3 pin with boot pin and I reconncted usb. It still didn't work. IAR shows me always the same message

Posted on November 07, 2012 at 18:39

Consider then what you changed between the time the board worked, and the time when it did not.

Consider using the ST-LINK utilities to check connectivity, or erase the part.

Check supply voltages.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
amedm
Associate II
Posted on November 07, 2012 at 18:49

I downloaded and installed STM32 ST-LINK Utility. I updated firmware and then erased chip... I can read bits with that but now it still doesn't work. I don't have external supply... I supply via usb. (Always thanks for the answers 🙂 )

Posted on November 07, 2012 at 19:08

Supplies to chip, inferring regulator, though if ST-LINK utilities can access it 3V3 is probably valid (perhaps 3V).

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
amedm
Associate II
Posted on November 08, 2012 at 16:46

It stills doesn't work... Thank you anyway

amedm
Associate II
Posted on November 13, 2012 at 13:25

It works again and I don't know why... Better this way. Thank you again for the support