Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
7befa10d
Commit
7befa10d
authored
4 years ago
by
rahix
Browse files
Options
Downloads
Plain Diff
Merge 'pycard10: Reliably trigger soft reset and enter raw REPL'
See merge request
!416
parents
56b73d41
f20b625a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!416
fix(pycard10): Reliably trigger soft reset and enter raw REPL
Pipeline
#4772
passed
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/pycard10.py
+6
-1
6 additions, 1 deletion
tools/pycard10.py
with
6 additions
and
1 deletion
tools/pycard10.py
+
6
−
1
View file @
7befa10d
...
...
@@ -129,6 +129,9 @@ class PyCard10(Pyboard):
Returns:
None
"""
self
.
soft_reset
()
self
.
serial
.
write
(
b
"
\x03\x03
"
)
# ctrl-C twice: interrupt any running program
# flush input (without relying on serial.flushInput())
...
...
@@ -169,10 +172,12 @@ class PyCard10(Pyboard):
self
.
serial
.
write
(
b
"
\x03\x03
"
)
# ctrl-C twice: interrupt any running program
self
.
serial
.
write
(
b
"
\x0
1
"
)
# ctrl-B: ensue it's the normal mode
self
.
serial
.
write
(
b
"
\x0
2
"
)
# ctrl-B: ensue it's the normal mode
self
.
serial
.
write
(
b
"
\x04
"
)
# ctrl-D: do the reset
time
.
sleep
(
1
)
# Give epicardium some time to cycle pycardium
n
=
self
.
serial
.
inWaiting
()
while
n
>
0
:
self
.
serial
.
read
(
n
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment