Skip to content
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

esp32s2 programmer failed after second run on j4m6 #98

Closed
phantomxe opened this issue May 17, 2023 · 4 comments
Closed

esp32s2 programmer failed after second run on j4m6 #98

phantomxe opened this issue May 17, 2023 · 4 comments

Comments

@phantomxe
Copy link

I got some error message at try to program ch32v003's 8-pin package. It works on fresh chip but crashes when i try to upload new code.

Found ESP32S2 Programmer
Error: Setup chip failed. Got code ffffffff
Could not setup interface.

I also tried minichlink -u mode.

Found ESP32S2 Programmer
Entering Unbrick Mode
Connection starting
/0/ffffffff
/0/ffffffff
...
lots of ffffffff
...
ioctl (GFEATURE): Connection timed out
Error: Got error -1 when sending hid feature report.
Error: Flash is not unlocked (CTLR = ffeffdff)
@dwillmore
Copy link
Collaborator

Have you tried using the "-u" option of minichlink? You need to let the programmer control power to the target if you aren't already.

@phantomxe
Copy link
Author

phantomxe commented May 17, 2023

I added power control circuit with pair of mosfets to GPIO11 and tried minichlink -u again.

Found ESP32S2 Programmer
Entering Unbrick Mode
Connection starting
/0/ffffffff
/0/ffffffff
/0/ffffffff
/0/ffffffff
/0/ffffffff
/0/ffffffff
/0/004c0c82
Flash unlocked
Whole-chip erase
Whole Chip Erase Code: 0

Seems to work. But when i try to program, it's not working.

Found ESP32S2 Programmer
Error: Setup chip failed. Got code ffffffff
Could not setup interface.

@cnlohr
Copy link
Owner

cnlohr commented May 18, 2023

Two thoughts:

  1. I have seen situations where the whole-chip erase was unsuccessful - can you try minichlink -ua If that works, let me know and I can make that default behavior.
  2. Can you hook it up to a logic analyzer?

@phantomxe
Copy link
Author

minichlink -ua worked! I can reprogram chip without any issues now.

waveform2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants