- Notifications
You must be signed in to change notification settings - Fork1k
Commit8888918
HardwareTimer: Fix assert failed when using TIMER_OUTPUT_COMPARE
When assert is activated there may be assert failed, speciallywhen using Tone or Servo with TIM6 or TIM7."assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));"This is due to the fact that when using timer instances withoutoutput (like TIM6 and TIM7 specially used for Tone and Servo)in TIMER_OUTPUT_COMPARE mode, the API setMode() requires a channel,even if it is not used.This was made like this to simplify the HardwareTimer driver,and there is no functional issue, but as there is an assert failedreported when assert is activated, this should be fixed.TIMER_OUTPUT_COMPARE becomes obsolete, but kept for compatibilityreason.When only timing configuration is needed, no need to set mode,just keep the default TIMER_DISABLED.Fixes#1244Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>1 parentd856484 commit8888918
File tree
4 files changed
+16
-11
lines changed- cores/arduino
- libraries/Servo/src/stm32
4 files changed
+16
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
| |||
406 | 405 | | |
407 | 406 | | |
408 | 407 | | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | 601 | | |
605 | 602 | | |
606 | 603 | | |
| |||
626 | 623 | | |
627 | 624 | | |
628 | 625 | | |
629 | | - | |
630 | | - | |
631 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
632 | 636 | | |
633 | 637 | | |
634 | 638 | | |
| |||
688 | 692 | | |
689 | 693 | | |
690 | 694 | | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
691 | 698 | | |
692 | 699 | | |
693 | 700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| |||
0 commit comments
Comments
(0)