zephyr/drivers/pwm/Kconfig.stm32
Florian Vaussard 20365bac0e pwm: stm32: Do not hardcode the prescalers
The prescalers are currently hardcoded and are not user-selectable. As a
result, the frequency of the timer can be inadequate to the task. For
instance, the frequency of the 16-bit timers (prescaler 10000) is
usually too low to correctly generate of PWM of a few kilohertz.

Hardcoded prescalers are replaced by Kconfigs so the user can choose at
compile time. The default value of each Kconfig matches the hardcoded
prescaler, so the change will be transparent.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2018-06-12 03:54:26 -04:00

458 lines
9.8 KiB
Plaintext

# Kconfig.stm32 - STM32 PWM configuration options
#
#
# Copyright (c) 2016 Linaro Limited.
#
# SPDX-License-Identifier: Apache-2.0
#
menuconfig PWM_STM32
bool "STM32 MCU PWM driver"
default n
depends on PWM && SOC_FAMILY_STM32
select USE_STM32_HAL_TIM
help
This option enables the PWM driver for STM32 family of
processors. Say y if you wish to use PWM port on STM32
MCU.
config PWM_STM32_1
bool "STM32 PWM 1 Output"
depends on PWM_STM32
default n
help
Enable output for PWM1 in the driver. Say y here
if you want to use PWM1 output.
config PWM_STM32_1_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_1"
depends on PWM_STM32_1
help
Specify the device name for the PWM driver.
config PWM_STM32_1_PRESCALER
int "STM32 PWM 1 Prescaler"
default 10000
depends on PWM_STM32_1
help
Clock prescaler at the input of the timer.
config PWM_STM32_2
bool "STM32 PWM 2 Output"
depends on PWM_STM32
default n
help
Enable output for PWM2 in the driver. Say y here
if you want to use PWM2 output.
config PWM_STM32_2_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_2"
depends on PWM_STM32_2
help
Specify the device name for the PWM driver.
config PWM_STM32_2_PRESCALER
int "STM32 PWM 2 Prescaler"
default 0
depends on PWM_STM32_2
help
Clock prescaler at the input of the timer.
config PWM_STM32_3
bool "STM32 PWM 3 Output"
depends on PWM_STM32
default n
help
Enable output for PWM3 in the driver. Say y here
if you want to use PWM3 output.
config PWM_STM32_3_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_3"
depends on PWM_STM32_3
help
Specify the device name for the PWM driver.
config PWM_STM32_3_PRESCALER
int "STM32 PWM 3 Prescaler"
default 10000
depends on PWM_STM32_3
help
Clock prescaler at the input of the timer.
config PWM_STM32_4
bool "STM32 PWM 4 Output"
depends on PWM_STM32
default n
help
Enable output for PWM4 in the driver. Say y here
if you want to use PWM4 output.
config PWM_STM32_4_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_4"
depends on PWM_STM32_4
help
Specify the device name for the PWM driver.
config PWM_STM32_4_PRESCALER
int "STM32 PWM 4 Prescaler"
default 10000
depends on PWM_STM32_4
help
Clock prescaler at the input of the timer.
config PWM_STM32_5
bool "STM32 PWM 5 Output"
depends on PWM_STM32
default n
help
Enable output for PWM5 in the driver. Say y here
if you want to use PWM5 output.
config PWM_STM32_5_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_5"
depends on PWM_STM32_5
help
Specify the device name for the PWM driver.
config PWM_STM32_5_PRESCALER
int "STM32 PWM 5 Prescaler"
default 0
depends on PWM_STM32_5
help
Clock prescaler at the input of the timer.
config PWM_STM32_6
bool "STM32 PWM 6 Output"
depends on PWM_STM32
default n
help
Enable output for PWM6 in the driver. Say y here
if you want to use PWM6 output.
config PWM_STM32_6_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_6"
depends on PWM_STM32_6
help
Specify the device name for the PWM driver.
config PWM_STM32_6_PRESCALER
int "STM32 PWM 6 Prescaler"
default 10000
depends on PWM_STM32_6
help
Clock prescaler at the input of the timer.
config PWM_STM32_7
bool "STM32 PWM 7 Output"
depends on PWM_STM32
default n
help
Enable output for PWM7 in the driver. Say y here
if you want to use PWM7 output.
config PWM_STM32_7_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_7"
depends on PWM_STM32_7
help
Specify the device name for the PWM driver.
config PWM_STM32_7_PRESCALER
int "STM32 PWM 7 Prescaler"
default 10000
depends on PWM_STM32_7
help
Clock prescaler at the input of the timer.
config PWM_STM32_8
bool "STM32 PWM 8 Output"
depends on PWM_STM32
default n
help
Enable output for PWM8 in the driver. Say y here
if you want to use PWM8 output.
config PWM_STM32_8_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_8"
depends on PWM_STM32_8
help
Specify the device name for the PWM driver.
config PWM_STM32_8_PRESCALER
int "STM32 PWM 8 Prescaler"
default 10000
depends on PWM_STM32_8
help
Clock prescaler at the input of the timer.
config PWM_STM32_9
bool "STM32 PWM 9 Output"
depends on PWM_STM32
default n
help
Enable output for PWM9 in the driver. Say y here
if you want to use PWM9 output.
config PWM_STM32_9_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_9"
depends on PWM_STM32_9
help
Specify the device name for the PWM driver.
config PWM_STM32_9_PRESCALER
int "STM32 PWM 9 Prescaler"
default 10000
depends on PWM_STM32_9
help
Clock prescaler at the input of the timer.
config PWM_STM32_10
bool "STM32 PWM 10 Output"
depends on PWM_STM32
default n
help
Enable output for PWM10 in the driver. Say y here
if you want to use PWM10 output.
config PWM_STM32_10_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_10"
depends on PWM_STM32_10
help
Specify the device name for the PWM driver.
config PWM_STM32_10_PRESCALER
int "STM32 PWM 10 Prescaler"
default 10000
depends on PWM_STM32_10
help
Clock prescaler at the input of the timer.
config PWM_STM32_11
bool "STM32 PWM 11 Output"
depends on PWM_STM32
default n
help
Enable output for PWM11 in the driver. Say y here
if you want to use PWM11 output.
config PWM_STM32_11_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_11"
depends on PWM_STM32_11
help
Specify the device name for the PWM driver.
config PWM_STM32_11_PRESCALER
int "STM32 PWM 11 Prescaler"
default 10000
depends on PWM_STM32_11
help
Clock prescaler at the input of the timer.
config PWM_STM32_12
bool "STM32 PWM 12 Output"
depends on PWM_STM32
default n
help
Enable output for PWM12 in the driver. Say y here
if you want to use PWM12 output.
config PWM_STM32_12_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_12"
depends on PWM_STM32_12
help
Specify the device name for the PWM driver.
config PWM_STM32_12_PRESCALER
int "STM32 PWM 12 Prescaler"
default 10000
depends on PWM_STM32_12
help
Clock prescaler at the input of the timer.
config PWM_STM32_13
bool "STM32 PWM 13 Output"
depends on PWM_STM32
default n
help
Enable output for PWM13 in the driver. Say y here
if you want to use PWM13 output.
config PWM_STM32_13_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_13"
depends on PWM_STM32_13
help
Specify the device name for the PWM driver.
config PWM_STM32_13_PRESCALER
int "STM32 PWM 13 Prescaler"
default 10000
depends on PWM_STM32_13
help
Clock prescaler at the input of the timer.
config PWM_STM32_14
bool "STM32 PWM 14 Output"
depends on PWM_STM32
default n
help
Enable output for PWM14 in the driver. Say y here
if you want to use PWM14 output.
config PWM_STM32_14_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_14"
depends on PWM_STM32_14
help
Specify the device name for the PWM driver.
config PWM_STM32_14_PRESCALER
int "STM32 PWM 14 Prescaler"
default 10000
depends on PWM_STM32_14
help
Clock prescaler at the input of the timer.
config PWM_STM32_15
bool "STM32 PWM 15 Output"
depends on PWM_STM32
default n
help
Enable output for PWM15 in the driver. Say y here
if you want to use PWM15 output.
config PWM_STM32_15_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_15"
depends on PWM_STM32_15
help
Specify the device name for the PWM driver.
config PWM_STM32_15_PRESCALER
int "STM32 PWM 15 Prescaler"
default 10000
depends on PWM_STM32_15
help
Clock prescaler at the input of the timer.
config PWM_STM32_16
bool "STM32 PWM 16 Output"
depends on PWM_STM32
default n
help
Enable output for PWM16 in the driver. Say y here
if you want to use PWM16 output.
config PWM_STM32_16_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_16"
depends on PWM_STM32_16
help
Specify the device name for the PWM driver.
config PWM_STM32_16_PRESCALER
int "STM32 PWM 16 Prescaler"
default 10000
depends on PWM_STM32_16
help
Clock prescaler at the input of the timer.
config PWM_STM32_17
bool "STM32 PWM 17 Output"
depends on PWM_STM32
default n
help
Enable output for PWM17 in the driver. Say y here
if you want to use PWM17 output.
config PWM_STM32_17_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_17"
depends on PWM_STM32_17
help
Specify the device name for the PWM driver.
config PWM_STM32_17_PRESCALER
int "STM32 PWM 17 Prescaler"
default 10000
depends on PWM_STM32_17
help
Clock prescaler at the input of the timer.
config PWM_STM32_18
bool "STM32 PWM 18 Output"
depends on PWM_STM32
default n
help
Enable output for PWM18 in the driver. Say y here
if you want to use PWM18 output.
config PWM_STM32_18_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_18"
depends on PWM_STM32_18
help
Specify the device name for the PWM driver.
config PWM_STM32_18_PRESCALER
int "STM32 PWM 18 Prescaler"
default 10000
depends on PWM_STM32_18
help
Clock prescaler at the input of the timer.
config PWM_STM32_19
bool "STM32 PWM 19 Output"
depends on PWM_STM32
default n
help
Enable output for PWM19 in the driver. Say y here
if you want to use PWM19 output.
config PWM_STM32_19_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_19"
depends on PWM_STM32_19
help
Specify the device name for the PWM driver.
config PWM_STM32_19_PRESCALER
int "STM32 PWM 19 Prescaler"
default 10000
depends on PWM_STM32_19
help
Clock prescaler at the input of the timer.
config PWM_STM32_20
bool "STM32 PWM 20 Output"
depends on PWM_STM32
default n
help
Enable output for PWM20 in the driver. Say y here
if you want to use PWM20 output.
config PWM_STM32_20_DEV_NAME
string "STM32 PWM Device Name"
default "PWM_20"
depends on PWM_STM32_20
help
Specify the device name for the PWM driver.
config PWM_STM32_20_PRESCALER
int "STM32 PWM 20 Prescaler"
default 10000
depends on PWM_STM32_20
help
Clock prescaler at the input of the timer.