Comments (6)
What version do you use? The name recently changes to st-flash. Try with recent git.
from stlink.
Pulled down a new copy today and the issue has been fixed. Thank you!
from stlink.
Still happens for me with a STM32F103. Any idea what is causing this bug or what commit resolved it?
I'm already using the --reset
option of st-flash
.
from stlink.
When the STM32 is in STOP2 mode, we need to assert the reset line with the ST-LINK in order to connect to it. ST-LINK Utility on windows calls this 'connect under reset'. The st-flash utility does call stlink_jtag_reset()
, but I've found that this doesn't work because its either happening at the wrong time, or the second parameter is incorrect (or both). I did some testing with wireshark to see what the correct parameters are to assert and deassert the reset line and they are 0 and 1 as you would expect. st-flash is using 2 which is maybe toggle? In my fork, I implemented a fix that works by adding a connect_under_reset parameter to stlink_open_usb(...)
and asserting the reset line before calling stlink_enter_swd_mode()
, which matches what I saw ST-LINK Utility doing with the connect under reset option. I can work on getting a cleaner version of that into a PR.
from stlink.
The original issue by @rogerdahl has been fixed in Release v1.0.0.
Feedback from @MartinNowak may be related to #36 and #257 and should be addressed by the changes proposed by @bmarvo. As there was no further response, I have included them with commit f767b82.
from stlink.
There have been several approaches to implement a "connect-under-reset-feature" in the codebase.
Also various reset issues related to this topic still appear frequently.
Against this background a clean-up along with a proper implementation and testing is necessary.
The most recent approach was implemented by @geoffreymbrown.
This issue is related to: #220, #254, #261, #382, #532, #533, #692
I have opened a separate branch connect-under-reset
which shall focus on this somehow essential refactoring.
Please refer to these issues for further coverage.
As this topic seems to have been fully addressed, I am finally closing this issue now.
from stlink.
Related Issues (20)
- STLinkv3: UDEV rules in Debian not matching STLINK-V3MINIE HOT 1
- [STM32G0B1RE / Nucleo G0B1RE]: False chip id reading HOT 2
- [STM32F103] stlink programmers are disappearing after running probing twice. HOT 2
- [STM32U575RGT6]: Verification failed at offset 43008 HOT 9
- [feature] Show all info during full erase HOT 13
- Latest release stlink-1.8.0-win32 doesn't run HOT 8
- Can't build stlink 1.8.0 for Fedora HOT 8
- [feature] Caching and diffing bin/hex HOT 1
- Update on #1357 HOT 1
- [feature] Read/write operations on external SPI Serial Flash Memory HOT 1
- STM32H7A: Flash write fails on second page HOT 2
- Compiling stlink with Raspberry Pi fails for v1.8.0 HOT 2
- Cmake minimal version mismatch HOT 1
- Debian 11 x64 doesn't work with v1.8.0 because of incompatible glibc HOT 3
- When I build stlink on windows, it says libusb not found HOT 1
- [feature] Just a question .. about next release and ... clones ... HOT 2
- CH32F103C8T6: Flashing fails because of timeout HOT 1
- [feature] Nucleo-H563ZI Board not recognized
- [STM32L4R5ZI]: gdb-multiarch uses wrong osabi
- [STM32L471RG]: STLINKV3 : can't flash the device. Programmer not supported ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stlink.