HW PWM disturbance

Hi!

I'm developing for nrf52832 using zephyr. I'm using the nordic hal driver in order to use the PWM with EasyDMA. The PWM is used to control a piezo buzzer. The PWM is working and to my understanding the CPU should not be able to interfere when using the PWM with EasyDMA. But we are having some typ of interference. If I have the BLE enabled the sound of the buzzer is a bit "blurry" but if I disablde the BLE or lowering the advertising interval (BT_GAP_ADV_SLOW_INT_MIN, BT_GAP_ADV_SLOW_INT_MAX) the sound is better.

Regardless of the settings on the BLE, once every 7-8 second i get like a interruption on the buzzer, just like something are interfering.

Is there something that can interfere with the PWM using EasyDMA?

Best regards Jonas

Parents Reply Children
  • Ok, that was quite big difference.

    Our product is dependent on the power consumption so I have another questions.

    Is it possible, when we need to drive the PWM controlling the buzzer, lock it so that it not using the HFINT. And then when we not using the PWM anymore switch back letting the system switch again between the clocks?

    Best regards Jonas

  • Hi!

    JonasS said:
    Is it possible, when we need to drive the PWM controlling the buzzer, lock it so that it not using the HFINT. And then when we not using the PWM anymore switch back letting the system switch again between the clocks?

    Yeah, absolutely. 

    Use 
    err = onoff_cancel_or_release(clk_mgr, &clk_cli);

    when the PWM is not being used.

Related