-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB hard reset causes total failure on STM32L053-Disco #334
Comments
I think this might be connected to the fact that the original _stlink_usb_reset() really does not reset and run the target like a push of the reset button, and that st-info and st-flash always calls reset when opening usb as discussed in #332 . |
We can try the following changes and see if they help, with the patch "Make _stlink_usb_reset use hardreset" applied, the idea is to understand what is actually going on . to In src/st-info.c:line 54 |
This works on my 053. You also have to make the same change to line 533 of gui/stlink-gui.c. I've never used "st-term", so I don't know about that one. |
I will look into this and check all resets, and also see how we can add optional resets. But its good the code works :) |
I'm using an STM32L053 Discovery board, connected via USB to a PC running Ubuntu 14.04.
An earlier version of st-flash and other tools were working for me, but when I built and installed the latest version, everything failed. "st-info --chipid" didn't print anything, st-flash always failed with chip-id 0 error, GUI wouldn't connect. Did the "git bisect" thing and narrowed it down to the 8271b32... commit on Aug 15, "Make _stlink_usb_reset use hardreset". Reversed that patch on the head and everything's happy again: GUI connects, st-info --chipid shows 0x0417, st-flash erase erases.
The comment at the head of _stlink_usb_reset is "TODO - not convinced this does anything..." Doesn't exactly inspire confidence. At any rate, whatever setup that was intended to fix isn't my setup, so you'll have to make that change conditional on something. Sorry, I have no clue what that might be.
The text was updated successfully, but these errors were encountered: