Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
d38939e6
Commit
d38939e6
authored
Feb 23, 2015
by
Damien George
Browse files
stmhal: Reset state of timer when deinit is called.
parent
caf5c40c
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/timer.c
View file @
d38939e6
...
...
@@ -686,6 +686,7 @@ STATIC mp_obj_t pyb_timer_deinit(mp_obj_t self_in) {
prev_chan
->
next
=
NULL
;
}
self
->
tim
.
State
=
HAL_TIM_STATE_RESET
;
self
->
tim
.
Instance
->
CCER
=
0x0000
;
// disable all capture/compare outputs
self
->
tim
.
Instance
->
CR1
=
0x0000
;
// disable the timer and reset its state
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment