Skip to content

HardwareTimer: assert failed when assert is activated, specially when using Servo or Tone #1244

Closed
@ABOSTM

Description

@ABOSTM

Describe the bug
When assert is activated there may be assert failed when using Tone or Servo.
assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
This is due to the fact that when using timer instances without output (like TIM6 and TIM7 specially used for Tone and Servo) in TIMER_OUTPUT_COMPARE,setMode()API required 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 failed reported when assert is activated, this should be fixed.

To Reproduce
Enable switch USE_FULL_ASSERT
Compile 'knob' servo example.

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions