b3b53a6dd4
Master configs/nucleo-f334r8: add example for the SPWM generation (custom STM32 PWM usage) arch/arm/src/stm32/stm32_pwm: fix compilation errors if the upper-half PWM logic is not enabled include/nuttx/drivers/pwm.h: remove dependency on CONFIG_PWM for the upper-half PWM header. This allows compilation for the lower-level PWM drivers even if the upper-half PWM logic is not used. arch/arm/src/stm32/stm32_tim.c: fix compilation error if there is no TIM8 configs/nucleo-f334r8/highpri: remove the upper-half ADC from configuration configs/nucleo-f302r8/highpri: remove the upper-half ADC from configuration configs/stm32f429i-disco/highpri: remove the upper-half ADC from configuration Approved-by: GregoryN <gnutt@nuttx.org>
51 lines
1.0 KiB
Plaintext
51 lines
1.0 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
if ARCH_BOARD_NUCLEO_F334R8
|
|
|
|
config NUCLEOF334R8_HIGHPRI
|
|
bool "High priority interrupt test"
|
|
default n
|
|
|
|
menuconfig NUCLEOF334R8_SPWM
|
|
bool "Sinusoidal PWM generator example"
|
|
default n
|
|
|
|
if NUCLEOF334R8_SPWM
|
|
|
|
choice
|
|
prompt "Sinusoidal PWM source"
|
|
default NUCLEOF334R8_SPWM_USE_TIM1
|
|
|
|
config NUCLEOF334R8_SPWM_USE_TIM1
|
|
bool "Use TIM1 as PWM source"
|
|
|
|
config NUCLEOF334R8_SPWM_USE_HRTIM1
|
|
bool "Use HRTIM as PWM source"
|
|
|
|
endchoice
|
|
|
|
config NUCLEOF334R8_SPWM_PWM_FREQ
|
|
int "PWM frequency in Hz"
|
|
default 100000
|
|
|
|
config NUCLEOF334R8_SPWM_SAMPLES
|
|
int "Sine samples"
|
|
default 100
|
|
|
|
config NUCLEOF334R8_SPWM_FREQ
|
|
int "Waveform frequency in Hz"
|
|
default 60
|
|
|
|
config NUCLEOF334R8_SPWM_PHASE_NUM
|
|
int "Number of phases"
|
|
default 1
|
|
range 1 5 if NUCLEOF334R8_SPWM_USE_HRTIM1
|
|
range 1 4 if NUCLEOF334R8_SPWM_USE_TIM1
|
|
|
|
endif
|
|
|
|
endif
|