mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 16:23:34 +00:00
So far nRF's TIMER was used for generating PWM signal. Add support for generating PWM based on RTC, which is sourced by 32KHz low frequency crystal. This allows to use low frequency PWM with much lower power consumption, because high frequency clock path can be disabled. Don't support RTC clock prescaler, because maximum 512s period covers most use cases. This allows to adjust pulse and period cycles to the fact that CLEAR task event is generated always one LFCLK cycle after period COMPARE value is reached. Also update hal_nordic revision, as it contains updated check for PPI channels conflict when RTC is used to generate PWM. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
18 lines
588 B
Plaintext
18 lines
588 B
Plaintext
# Nordic Semiconductor nRF5x s/w PWM configuration options
|
|
|
|
# Copyright (c) 2017 Nordic Semiconductor ASA
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config PWM_NRF5_SW
|
|
bool "Nordic Semiconductor nRF5x series S/W PWM"
|
|
default y if !PWM_NRFX
|
|
depends on SOC_FAMILY_NRF
|
|
help
|
|
Enable driver to utilize PWM on the Nordic Semiconductor nRF5x series.
|
|
|
|
When used with HF timer it provides up to 3 pins, utilizing two PPI
|
|
channels per pin and one GPIOTE config per pin.
|
|
|
|
When used with RTC it provides up to 3 pins, utilizing three PPI
|
|
channels per pin and one GPIOTE config per pin.
|