This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RTC0 AND RTC1

hi , I have a question about rtc.In my project ,I use rtc1 for app timer and rct0 for low_power_pwm.The problem is that I dont't have any idear to enable rtc0 instead of rtc1 in the low_power_pwm .Thank you very much.And i use sdk 10.0 .

Parents
  • The low-power PWM library is for applications where you don't need high frequency or accuracy. The low power pwm example should be suitable for LEDs, as LEDs usually do not require that high PWM frequency. But for peripherals that need a high accuracy, you should use the PWM library instead.

    As the low-power PWM library use the apptimer, the configuration of the apptimer determines the frequency range supported by the low-power PWM library. The "period" in the low-power PWM library is in app_timer in ticks, which depend on the prescaler of the RTC1, which is set with when you call APP_TIMER_INIT() with APP_TIMER_PRESCALER.

Reply
  • The low-power PWM library is for applications where you don't need high frequency or accuracy. The low power pwm example should be suitable for LEDs, as LEDs usually do not require that high PWM frequency. But for peripherals that need a high accuracy, you should use the PWM library instead.

    As the low-power PWM library use the apptimer, the configuration of the apptimer determines the frequency range supported by the low-power PWM library. The "period" in the low-power PWM library is in app_timer in ticks, which depend on the prescaler of the RTC1, which is set with when you call APP_TIMER_INIT() with APP_TIMER_PRESCALER.

Children
Related