-
Notifications
You must be signed in to change notification settings - Fork 1k
HardwareTimer: assert failed when assert is activated, specially when using Servo or Tone #1244
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
Labels
bug 🐛
Something isn't working
Comments
ABOSTM
added a commit
to ABOSTM/Arduino_Core_STM32
that referenced
this issue
Dec 1, 2020
When assert is activated there may be assert failed, specially when 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 without output (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 failed reported when assert is activated, this should be fixed. TIMER_OUTPUT_COMPARE becomes obsolete, but kept for compatibility reason. When only timing configuration is needed, no need to set mode, just keep the default TIMER_DISABLED. Fixers stm32duino#1244 Signed-off-by: Alexandre Bourdiol <[email protected]>
ABOSTM
added a commit
to ABOSTM/Arduino_Core_STM32
that referenced
this issue
Dec 1, 2020
When assert is activated there may be assert failed, specially when 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 without output (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 failed reported when assert is activated, this should be fixed. TIMER_OUTPUT_COMPARE becomes obsolete, but kept for compatibility reason. When only timing configuration is needed, no need to set mode, just keep the default TIMER_DISABLED. Fixes stm32duino#1244 Signed-off-by: Alexandre Bourdiol <[email protected]>
ABOSTM
added a commit
to ABOSTM/Arduino_Core_STM32
that referenced
this issue
Dec 1, 2020
When assert is activated there may be assert failed, specially when 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 without output (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 failed reported when assert is activated, this should be fixed. TIMER_OUTPUT_COMPARE becomes obsolete, but kept for compatibility reason. When only timing configuration is needed, no need to set mode, just keep the default TIMER_DISABLED. Fixes stm32duino#1244 Signed-off-by: Alexandre Bourdiol <[email protected]>
ABOSTM
added a commit
to ABOSTM/Arduino_Core_STM32
that referenced
this issue
Dec 1, 2020
When assert is activated there may be assert failed, specially when 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 without output (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 failed reported when assert is activated, this should be fixed. TIMER_OUTPUT_COMPARE becomes obsolete, but kept for compatibility reason. When only timing configuration is needed, no need to set mode, just keep the default TIMER_DISABLED. Fixes stm32duino#1244 Signed-off-by: Alexandre Bourdiol <[email protected]>
fpistm
pushed a commit
that referenced
this issue
Dec 2, 2020
When assert is activated there may be assert failed, specially when 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 without output (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 failed reported when assert is activated, this should be fixed. TIMER_OUTPUT_COMPARE becomes obsolete, but kept for compatibility reason. When only timing configuration is needed, no need to set mode, just keep the default TIMER_DISABLED. Fixes #1244 Signed-off-by: Alexandre Bourdiol <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: