FATAL error ST-Link No MCU device found - embedded

I'am using IAR Workbench and I am having hard time to flash my STM32F407VG I got:
FATAL error ST-Link No MCU device found.
The USB cable connecting the laptop and the MCU is new so I don't think it's the problem.
ST-Link en.stsw-link009 is installed
When I go to project options Debugger > ST-Link > Reset > connect during reset and try to download again I got:
Warning stack pointer is setup to incorrect alignement stack addr = 0x00000016 after the download progress bar stay blocked.
By navigating in the option menu I find it's possible to adjust CPU frequency actually it's 72 MHz, the default one, I changed it to 168 MHz, the CPU frequency but the problem remains.
Could you please suggest me some solutions to debug/resolve the problem.
Edit
I have used STM32 ST-Link Utility and i succeded to connect to the board, But the problem with my IDE is not resolved yet.

I used ST-Link Utility to erase flash memory, once this is done i activated
Debugger > ST-Link > Reset > connect during reset
and all works well, i don't know why but i'am glad to see my board works again
Thank you for your help

Related

How to install ST-Link driver onto STM32 Discovery Board for Visual GDB Debugging

I am attempting to program a STM32VLDiscovery Board, using Visual Studio 2019, Visual GDB and STM32CubeMX. When I connect the board to the machine, it appears as 'USB Mass Storage Device'. I am using a Windows 10 VM. The program builds fine, but when I attempt to begin on-board debugging, I get an error message stating:
USB Mass Storage Device" does not appear to have "ST-Link Driver"
driver installed. The debugger may have problems finding your decvice.
Try installing it now?
If I click yes, then a bit of software called UsbDriverTool.exe starts and a progress bar appears with the message
VisualGDB is installing the following USB driver: ST-Link Driver the following device: USB Mass Storage Device
This then fails with the message
Automatic driver installation gailed. Do you want to try installing it manually?
Clicking 'yes' again gets the message
USB driver installation failed with code -532462766
And then finally
open failed (no matching adapter found)
Can anyone tell me please, how I go about getting the ST-Link driver on to the discovery board so that I can start debugging my code?
(One other thing that may be relevant. I tried using the STM32 ST-Link Utility program to program the code on to the board. I find that it will only connect to the board if I am holding reset whilst I press the 'connect' button.

STM32CUBEIDE st link gdb debug error in final launch sequence

So, I am learning stm32 mcus, using a nucleo f4 board.
Everything was working fine and now debug launch fails.
Actually, I was doing one debug, closed it and next debug session won't launch.
It starts debug on Linux or on Windows with OpenOCD, but ST-Link GDB debug fails (gdb does work on linux).
This is the error message:
Already did allow the stlink server in the windows firewall.
Avast antivirus was deleting the STLINK server exe file, added an exception and it works.
Also the problem is the mass storage option (that allows use the explorer to grab directly the hex files) and makes conflicts with the ide. I solved the problem using explorer and ejecting the board, then debugger goes fine.

STM32 not starting after programming with ST-LINK

I did a program using ST-Link debugger on a custom board. The program is working fine. However, when I program the chip using ST-Link utility, the program is not starting without the ST-Link connected. When the ST-Link is connected, the system starts.
Anyone had such an issue?
Ok it is a bit stupid but I have to admit that in the stress I got a bit blind.
When I said:
The program is working fine however when I program the chip using ST-Link utility, the program is not starting without the ST-Link connected.
I was actually testing with only the usb removed from the ST-LINK and not removing totally the JTAG. So now I know that the ST-LINK is pulling down the reset when not powered.
Thanks Tom and staringlizard, you noted interesting thinks. Actually the Boot0 was my previous issue...

STLINK cannot detect my STM32VL discovery

I'm working on a debian 6.0 installed on virtualbox 4 hosted by Windows7, and I'm trying to get my STM32VL work using STLINK project that allows programming and debugging STM32 on Linux.
I followed their tutorial and installed all needed dependancies.
But when I run the program ./​​st-util -1, I get the following error:
tbarry#darkstar:~/stlink$ ./st-util -1
2014-03-20T10:18:48 WARN src/stlink-sg.c: Failed to find an stlink v1 by VID:PID
Error: could not open stlink device
Error: could not open stlink device
I underline that I have already installed Virtualbox extensions, and usb 2.0 is well handled.
Does anyone have an idea of ​​what is blocking me?
I'd same problem. It was driver problem. Windows detected my st-link as mass storage device, so st-util didn't see it. I've used zadig utility in order to change the driver.
Not having found a solution to my problem, I tried with VMware player and it worked nice.
Conclusion: Whatever the problem I had, it was coming from VirtualBox.

USB device is not detected properly

I am using am335x board.USB device is detected when it is inserted while booting up the board. after the board is booted up, i unplug the device and is inserted again,it is not detected.usb driver switches off the vbus session when a device is disconnected from its port.every time i need to start the session using the command "echo F > /proc/driver/musb_hdrc".How to make it auto detect? If anyone has faced this problem,please post reply.
If faced the same problem. It seems that when you use ULPI mode, starting vbus does not work.
Have a look on a newer kernel in file drivers/usb/musb/omap2430.c
When an USB_EVENT_ID got notified, you should turn on vbus independtly of the mode your otg is working.
hope that helps.