Dear all:
Recently, I was debugging nrf52805 by custom PCB, using sdk17.00, I enabled PWM, frequency of 4kHz, to drive 4kHz passive buzzer, encountered a problem:
The buzzer seems to have a strong noise, as if it was interrupted by something.
We analyzed the PWM waveform with an oscilloscope and found that there was no problem with the waveform.
We also tried to analyze the causes of the noise. After we turned off the advertising, the buzzer noise almost disappeared.
We tried to move the same driver to nRF52810 and nRF52832, and found that even if there was a advertising, the buzzer would not have noise, which was very stable.
The PWM configuration I use is as follows:
static void PWM_config(void)
{
app_pwm_config_t Buzzer_function_pwm_cfg =
APP_PWM_DEFAULT_CONFIG_1CH(250, BUZZER);
ret_code_t err_code = app_pwm_init(&Buzzer_function, &Buzzer_function_pwm_cfg, NULL);
APP_ERROR_CHECK(err_code);
app_pwm_enable(&Buzzer_function);
app_pwm_channel_duty_set(&Buzzer_function, 0, 50);
}
Can someone give me some advice?
Thanks