Development-Board-C-Examples icon indicating copy to clipboard operation
Development-Board-C-Examples copied to clipboard

The problem about Buzzer Example

Open wangbo13 opened this issue 3 years ago • 1 comments

About the Buzzer Problem of the RoBomaster C Board Hello After our actual testing the Buzzer example in the C Board Example is problematic. If the buzzer will have a noticeable stuttering sound according to the delay code (delay(10)) in the example, but if you set the delay above 100, the problem will disappear, please verify, thank you.

buzzer_on(psc, pwm); HAL_Delay(1);

It will work by this change buzzer_on(psc, pwm); HAL_Delay(100);

wangbo13 avatar Jun 03 '22 04:06 wangbo13

Thank you. Timer 4 is on APB1, and its frequency is 84MHz. The minimum frequency of the buzzer is 84MHz/(1000+1)/(20000+1), about 4.19Hz. It is best to set the delay greater than 250ms.

luoxiaopin avatar Sep 03 '22 13:09 luoxiaopin