cancel
Showing results for 
Search instead for 
Did you mean: 

cannot connect to stm32f4

blaz
Associate
Posted on November 11, 2012 at 14:36

The first problem I got, was when using debugger in IAR: Fatal error: ST-Link Connection error.

Then I tried to erase flash with stm32 st-link utility, but I get an error: No STLink detected. Any idea how to fix this? The board is new and it was the first program I tried to download to it. it crashed on this program

int
main(
void
)
{
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);
GPIOB->MODER = (1 << 30);
GPIOB->ODR = (1 << 15);
}

#st-link-connection-error
3 REPLIES 3
Posted on November 11, 2012 at 15:17

Any idea how to fix this? 

Get BOOT0 High and restart board, you should then be able to erase your code.

Tip: Don't blind write to registers whose current content you don't know/understand.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
blaz
Associate
Posted on November 12, 2012 at 14:27

How do I do that? Are you talking about sb18, or the boot0 gpio pin? That one I can't get hight programatically, should I just bring some voltage on?

What's wrong with the code? I mean, it's just enabling gpios, what could go wrong here?

edit:

I connected boot0 to 3V and pressed reset button. The 4 leds stop blinking, but I still get ''no STLink detected''

edit #2:

Windows ( 8 ) device manager, shows missing driver for ST-link. But I tried instlaling both st-link_usbdriver and st-link_v2_usbdriver . But the driver is still missing.

Posted on November 12, 2012 at 17:01

Driver is not signed, Windows 8 will not load unless you enable using unsigned drivers.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..