Hi
I have a problem programming STM32 with ST-Link via flowcode,
So here is the problem if in my program I init SPI to work with ILI9341 Display flowcode does not detect target via ST-Link
if I use st-link Utility ( GUI version ) it works fine .
I think is because ST-Link utility resets the MCU exactly before programming it .
Is it possible to make flowcode do the same?
STM32F407 with ST-Link
-
- Posts: 152
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 7:23 pm
- Has thanked: 46 times
- Been thanked: 19 times
-
- Valued Contributor
- Posts: 402
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 220 times
Re: STM32F407 with ST-Link
Hi
If you have the reset pin connected to the ST-LINK, you could try this ...
Edit the stm32prog.bat file found in C:\Program Files (x86)\Flowcode\Common\Compilers\starm\batch
Add the -HardRst command to the programmer line
Let us know if that works for you.
If you have the reset pin connected to the ST-LINK, you could try this ...
Edit the stm32prog.bat file found in C:\Program Files (x86)\Flowcode\Common\Compilers\starm\batch
Add the -HardRst command to the programmer line
Code: Select all
@ST-LINK_CLI.exe -HardRst -P "%MX_LOCATION%%MX_PROJECT%.hex" -Run
Re: STM32F407 with ST-Link
Thanks for your reply
I have done that, but it does not work so I was wrong must be something alse
any idea why this happening?
STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface
No target connected
Unable to connect to ST-LINK!
Error(s)!
Autoclose turned off
FINISHED
I have done that, but it does not work so I was wrong must be something alse
any idea why this happening?
STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface
No target connected
Unable to connect to ST-LINK!
Error(s)!
Autoclose turned off
FINISHED
-
- Valued Contributor
- Posts: 402
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 220 times
Re: STM32F407 with ST-Link
In my experience it does seem easy to "crash" the ST-LINK, driven from command line tool, irrespective of Flowcode.
Most successful sequence is: connect ST-LINK to target, apply power to target, connect ST-LINK to PC USB, invoke ST-LINK_CLI
Most successful sequence is: connect ST-LINK to target, apply power to target, connect ST-LINK to PC USB, invoke ST-LINK_CLI