Clock source for Timer and PWM modules

Hello everyone,

Can someone help confirm if the Timer and PWM modules on nRF52840 can only use the high frequency (HF) clock source (1 MHz or higher) and cannot run from the 32kHz low frequency crystal? This seems the case based on the datasheet - just want to know for sure. And is it possible to run the Timer or PWM module from an externally provided digital clock signal that is coming in on a GPIO pin?

This is for power consumption consideration for an application I'm working on.

Thank you!

Wenhao

Parents
  • Hi,

    Can someone help confirm if the Timer and PWM modules on nRF52840 can only use the high frequency (HF) clock source (1 MHz or higher) and cannot run from the 32kHz low frequency crystal? This seems the case based on the datasheet - just want to know for sure. And is it possible to run the Timer or PWM module from an externally provided digital clock signal that is coming in on a GPIO pin?

    This is for power consumption consideration for an application I'm working on.

    Correct, they both work on the HFCLK and it's not possible to run them from another source.

    However, for low power application I would recommend using the low power PWM library which is basically bit banging PWM by using the GPIO peripheral and the low power RTC instead of the HFCLK. The drawback is that it's less accurate then using the PWM peripheral with the HFCLK. You can evaluate the low power PWM library by testing the example in the nRF5SDK, documentation can be found here and here.

    regards

    Jared 

Reply
  • Hi,

    Can someone help confirm if the Timer and PWM modules on nRF52840 can only use the high frequency (HF) clock source (1 MHz or higher) and cannot run from the 32kHz low frequency crystal? This seems the case based on the datasheet - just want to know for sure. And is it possible to run the Timer or PWM module from an externally provided digital clock signal that is coming in on a GPIO pin?

    This is for power consumption consideration for an application I'm working on.

    Correct, they both work on the HFCLK and it's not possible to run them from another source.

    However, for low power application I would recommend using the low power PWM library which is basically bit banging PWM by using the GPIO peripheral and the low power RTC instead of the HFCLK. The drawback is that it's less accurate then using the PWM peripheral with the HFCLK. You can evaluate the low power PWM library by testing the example in the nRF5SDK, documentation can be found here and here.

    regards

    Jared 

Children
Related