From 57cccf49d36cb842806d55bb7c1a7b5bc47b708e Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 6 Jan 2012 21:25:27 +0000 Subject: [PATCH] Make STM32 F4 TIM pin naming consistent with F1 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4272 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/stm32/stm32_pwm.h | 96 +++++++++---------- configs/stm3240g-eval/README.txt | 2 +- configs/stm3240g-eval/include/board.h | 4 +- configs/stm3240g-eval/src/stm3240g-internal.h | 2 +- configs/stm3240g-eval/src/up_pwm.c | 2 +- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/arch/arm/src/stm32/stm32_pwm.h b/arch/arm/src/stm32/stm32_pwm.h index b7179a7bcb..c51c569504 100644 --- a/arch/arm/src/stm32/stm32_pwm.h +++ b/arch/arm/src/stm32/stm32_pwm.h @@ -131,13 +131,13 @@ # if !defined(CONFIG_STM32_TIM1_CHANNEL) # error "CONFIG_STM32_TIM1_CHANNEL must be provided" # elif CONFIG_STM32_TIM1_CHANNEL == 1 -# define PWM_TIM1_PINCFG GPIO_TIM1_CH1 +# define PWM_TIM1_PINCFG GPIO_TIM1_CH1OUT # elif CONFIG_STM32_TIM1_CHANNEL == 2 -# define PWM_TIM1_PINCFG GPIO_TIM1_CH2 +# define PWM_TIM1_PINCFG GPIO_TIM1_CH2OUT # elif CONFIG_STM32_TIM1_CHANNEL == 3 -# define PWM_TIM1_PINCFG GPIO_TIM1_CH3 +# define PWM_TIM1_PINCFG GPIO_TIM1_CH3OUT # elif CONFIG_STM32_TIM1_CHANNEL == 4 -# define PWM_TIM1_PINCFG GPIO_TIM1_CH4 +# define PWM_TIM1_PINCFG GPIO_TIM1_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM1_CHANNEL" # endif @@ -147,13 +147,13 @@ # if !defined(CONFIG_STM32_TIM2_CHANNEL) # error "CONFIG_STM32_TIM2_CHANNEL must be provided" # elif CONFIG_STM32_TIM2_CHANNEL == 1 -# define PWM_TIM2_PINCFG GPIO_TIM2_CH1 +# define PWM_TIM2_PINCFG GPIO_TIM2_CH1OUT # elif CONFIG_STM32_TIM2_CHANNEL == 2 -# define PWM_TIM2_PINCFG GPIO_TIM2_CH2 +# define PWM_TIM2_PINCFG GPIO_TIM2_CH2OUT # elif CONFIG_STM32_TIM2_CHANNEL == 3 -# define PWM_TIM2_PINCFG GPIO_TIM2_CH3 +# define PWM_TIM2_PINCFG GPIO_TIM2_CH3OUT # elif CONFIG_STM32_TIM2_CHANNEL == 4 -# define PWM_TIM2_PINCFG GPIO_TIM2_CH4 +# define PWM_TIM2_PINCFG GPIO_TIM2_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM2_CHANNEL" # endif @@ -163,13 +163,13 @@ # if !defined(CONFIG_STM32_TIM3_CHANNEL) # error "CONFIG_STM32_TIM3_CHANNEL must be provided" # elif CONFIG_STM32_TIM3_CHANNEL == 1 -# define PWM_TIM3_PINCFG GPIO_TIM3_CH1 +# define PWM_TIM3_PINCFG GPIO_TIM3_CH1OUT # elif CONFIG_STM32_TIM3_CHANNEL == 2 -# define PWM_TIM3_PINCFG GPIO_TIM3_CH2 +# define PWM_TIM3_PINCFG GPIO_TIM3_CH2OUT # elif CONFIG_STM32_TIM3_CHANNEL == 3 -# define PWM_TIM3_PINCFG GPIO_TIM3_CH3 +# define PWM_TIM3_PINCFG GPIO_TIM3_CH3OUT # elif CONFIG_STM32_TIM3_CHANNEL == 4 -# define PWM_TIM3_PINCFG GPIO_TIM3_CH4 +# define PWM_TIM3_PINCFG GPIO_TIM3_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM3_CHANNEL" # endif @@ -179,13 +179,13 @@ # if !defined(CONFIG_STM32_TIM4_CHANNEL) # error "CONFIG_STM32_TIM4_CHANNEL must be provided" # elif CONFIG_STM32_TIM4_CHANNEL == 1 -# define PWM_TIM4_PINCFG GPIO_TIM4_CH1 +# define PWM_TIM4_PINCFG GPIO_TIM4_CH1OUT # elif CONFIG_STM32_TIM4_CHANNEL == 2 -# define PWM_TIM4_PINCFG GPIO_TIM4_CH2 +# define PWM_TIM4_PINCFG GPIO_TIM4_CH2OUT # elif CONFIG_STM32_TIM4_CHANNEL == 3 -# define PWM_TIM4_PINCFG GPIO_TIM4_CH3 +# define PWM_TIM4_PINCFG GPIO_TIM4_CH3OUT # elif CONFIG_STM32_TIM4_CHANNEL == 4 -# define PWM_TIM4_PINCFG GPIO_TIM4_CH4 +# define PWM_TIM4_PINCFG GPIO_TIM4_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM4_CHANNEL" # endif @@ -195,13 +195,13 @@ # if !defined(CONFIG_STM32_TIM5_CHANNEL) # error "CONFIG_STM32_TIM5_CHANNEL must be provided" # elif CONFIG_STM32_TIM5_CHANNEL == 1 -# define PWM_TIM5_PINCFG GPIO_TIM5_CH1 +# define PWM_TIM5_PINCFG GPIO_TIM5_CH1OUT # elif CONFIG_STM32_TIM5_CHANNEL == 2 -# define PWM_TIM5_PINCFG GPIO_TIM5_CH2 +# define PWM_TIM5_PINCFG GPIO_TIM5_CH2OUT # elif CONFIG_STM32_TIM5_CHANNEL == 3 -# define PWM_TIM5_PINCFG GPIO_TIM5_CH3 +# define PWM_TIM5_PINCFG GPIO_TIM5_CH3OUT # elif CONFIG_STM32_TIM5_CHANNEL == 4 -# define PWM_TIM5_PINCFG GPIO_TIM5_CH4 +# define PWM_TIM5_PINCFG GPIO_TIM5_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM5_CHANNEL" # endif @@ -211,13 +211,13 @@ # if !defined(CONFIG_STM32_TIM8_CHANNEL) # error "CONFIG_STM32_TIM8_CHANNEL must be provided" # elif CONFIG_STM32_TIM8_CHANNEL == 1 -# define PWM_TIM8_PINCFG GPIO_TIM8_CH1 +# define PWM_TIM8_PINCFG GPIO_TIM8_CH1OUT # elif CONFIG_STM32_TIM8_CHANNEL == 2 -# define PWM_TIM8_PINCFG GPIO_TIM8_CH2 +# define PWM_TIM8_PINCFG GPIO_TIM8_CH2OUT # elif CONFIG_STM32_TIM8_CHANNEL == 3 -# define PWM_TIM8_PINCFG GPIO_TIM8_CH3 +# define PWM_TIM8_PINCFG GPIO_TIM8_CH3OUT # elif CONFIG_STM32_TIM8_CHANNEL == 4 -# define PWM_TIM8_PINCFG GPIO_TIM8_CH4 +# define PWM_TIM8_PINCFG GPIO_TIM8_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM8_CHANNEL" # endif @@ -227,13 +227,13 @@ # if !defined(CONFIG_STM32_TIM9_CHANNEL) # error "CONFIG_STM32_TIM9_CHANNEL must be provided" # elif CONFIG_STM32_TIM9_CHANNEL == 1 -# define PWM_TIM9_PINCFG GPIO_TIM9_CH1 +# define PWM_TIM9_PINCFG GPIO_TIM9_CH1OUT # elif CONFIG_STM32_TIM9_CHANNEL == 2 -# define PWM_TIM9_PINCFG GPIO_TIM9_CH2 +# define PWM_TIM9_PINCFG GPIO_TIM9_CH2OUT # elif CONFIG_STM32_TIM9_CHANNEL == 3 -# define PWM_TIM9_PINCFG GPIO_TIM9_CH3 +# define PWM_TIM9_PINCFG GPIO_TIM9_CH3OUT # elif CONFIG_STM32_TIM9_CHANNEL == 4 -# define PWM_TIM9_PINCFG GPIO_TIM9_CH4 +# define PWM_TIM9_PINCFG GPIO_TIM9_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM9_CHANNEL" # endif @@ -243,13 +243,13 @@ # if !defined(CONFIG_STM32_TIM10_CHANNEL) # error "CONFIG_STM32_TIM10_CHANNEL must be provided" # elif CONFIG_STM32_TIM10_CHANNEL == 1 -# define PWM_TIM10_PINCFG GPIO_TIM10_CH1 +# define PWM_TIM10_PINCFG GPIO_TIM10_CH1OUT # elif CONFIG_STM32_TIM10_CHANNEL == 2 -# define PWM_TIM10_PINCFG GPIO_TIM10_CH2 +# define PWM_TIM10_PINCFG GPIO_TIM10_CH2OUT # elif CONFIG_STM32_TIM10_CHANNEL == 3 -# define PWM_TIM10_PINCFG GPIO_TIM10_CH3 +# define PWM_TIM10_PINCFG GPIO_TIM10_CH3OUT # elif CONFIG_STM32_TIM10_CHANNEL == 4 -# define PWM_TIM10_PINCFG GPIO_TIM10_CH4 +# define PWM_TIM10_PINCFG GPIO_TIM10_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM10_CHANNEL" # endif @@ -259,13 +259,13 @@ # if !defined(CONFIG_STM32_TIM11_CHANNEL) # error "CONFIG_STM32_TIM11_CHANNEL must be provided" # elif CONFIG_STM32_TIM11_CHANNEL == 1 -# define PWM_TIM11_PINCFG GPIO_TIM11_CH1 +# define PWM_TIM11_PINCFG GPIO_TIM11_CH1OUT # elif CONFIG_STM32_TIM11_CHANNEL == 2 -# define PWM_TIM11_PINCFG GPIO_TIM11_CH2 +# define PWM_TIM11_PINCFG GPIO_TIM11_CH2OUT # elif CONFIG_STM32_TIM11_CHANNEL == 3 -# define PWM_TIM11_PINCFG GPIO_TIM11_CH3 +# define PWM_TIM11_PINCFG GPIO_TIM11_CH3OUT # elif CONFIG_STM32_TIM11_CHANNEL == 4 -# define PWM_TIM11_PINCFG GPIO_TIM11_CH4 +# define PWM_TIM11_PINCFG GPIO_TIM11_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM11_CHANNEL" # endif @@ -275,13 +275,13 @@ # if !defined(CONFIG_STM32_TIM12_CHANNEL) # error "CONFIG_STM32_TIM12_CHANNEL must be provided" # elif CONFIG_STM32_TIM12_CHANNEL == 1 -# define PWM_TIM12_PINCFG GPIO_TIM12_CH1 +# define PWM_TIM12_PINCFG GPIO_TIM12_CH1OUT # elif CONFIG_STM32_TIM12_CHANNEL == 2 -# define PWM_TIM12_PINCFG GPIO_TIM12_CH2 +# define PWM_TIM12_PINCFG GPIO_TIM12_CH2OUT # elif CONFIG_STM32_TIM12_CHANNEL == 3 -# define PWM_TIM12_PINCFG GPIO_TIM12_CH3 +# define PWM_TIM12_PINCFG GPIO_TIM12_CH3OUT # elif CONFIG_STM32_TIM12_CHANNEL == 4 -# define PWM_TIM12_PINCFG GPIO_TIM12_CH4 +# define PWM_TIM12_PINCFG GPIO_TIM12_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM12_CHANNEL" # endif @@ -291,13 +291,13 @@ # if !defined(CONFIG_STM32_TIM13_CHANNEL) # error "CONFIG_STM32_TIM13_CHANNEL must be provided" # elif CONFIG_STM32_TIM13_CHANNEL == 1 -# define PWM_TIM13_PINCFG GPIO_TIM13_CH1 +# define PWM_TIM13_PINCFG GPIO_TIM13_CH1OUT # elif CONFIG_STM32_TIM13_CHANNEL == 2 -# define PWM_TIM13_PINCFG GPIO_TIM13_CH2 +# define PWM_TIM13_PINCFG GPIO_TIM13_CH2OUT # elif CONFIG_STM32_TIM13_CHANNEL == 3 -# define PWM_TIM13_PINCFG GPIO_TIM13_CH3 +# define PWM_TIM13_PINCFG GPIO_TIM13_CH3OUT # elif CONFIG_STM32_TIM13_CHANNEL == 4 -# define PWM_TIM13_PINCFG GPIO_TIM13_CH4 +# define PWM_TIM13_PINCFG GPIO_TIM13_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM13_CHANNEL" # endif @@ -307,13 +307,13 @@ # if !defined(CONFIG_STM32_TIM14_CHANNEL) # error "CONFIG_STM32_TIM14_CHANNEL must be provided" # elif CONFIG_STM32_TIM14_CHANNEL == 1 -# define PWM_TIM14_PINCFG GPIO_TIM14_CH1 +# define PWM_TIM14_PINCFG GPIO_TIM14_CH1OUT # elif CONFIG_STM32_TIM14_CHANNEL == 2 -# define PWM_TIM14_PINCFG GPIO_TIM14_CH2 +# define PWM_TIM14_PINCFG GPIO_TIM14_CH2OUT # elif CONFIG_STM32_TIM14_CHANNEL == 3 -# define PWM_TIM14_PINCFG GPIO_TIM14_CH3 +# define PWM_TIM14_PINCFG GPIO_TIM14_CH3OUT # elif CONFIG_STM32_TIM14_CHANNEL == 4 -# define PWM_TIM14_PINCFG GPIO_TIM14_CH4 +# define PWM_TIM14_PINCFG GPIO_TIM14_CH4OUT # else # error "Unsupported value of CONFIG_STM32_TIM14_CHANNEL" # endif diff --git a/configs/stm3240g-eval/README.txt b/configs/stm3240g-eval/README.txt index 7e4046be94..4ce507244c 100755 --- a/configs/stm3240g-eval/README.txt +++ b/configs/stm3240g-eval/README.txt @@ -213,7 +213,7 @@ configured to output a pulse train using TIM4 CH2. This pin is used by FSMC is but is also connected to the Motor Control Connector (CN5) just for this purpose: - PD13 FSMC_A18 / MC_TIM4_CH2 pin 33 (EnB) + PD13 FSMC_A18 / MC_TIM4_CH2OUT pin 33 (EnB) FSMC must be disabled in this case! PD13 is available at: diff --git a/configs/stm3240g-eval/include/board.h b/configs/stm3240g-eval/include/board.h index 80ac9a8097..6ad4736d73 100755 --- a/configs/stm3240g-eval/include/board.h +++ b/configs/stm3240g-eval/include/board.h @@ -311,7 +311,7 @@ * but is also connected to the Motor Control Connector (CN5) just for this * purpose: * - * PD13 FSMC_A18 / MC_TIM4_CH2 pin 33 (EnB) + * PD13 FSMC_A18 / MC_TIM4_CH2OUT pin 33 (EnB) * * FSMC must be disabled in this case! PD13 is available at: * @@ -320,7 +320,7 @@ * Motor Control Connector CN15, pin 33 -- not available unless you bridge SB14. */ -#define GPIO_TIM4_CH2 GPIO_TIM4_CH2_2 +#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2 /* CAN * diff --git a/configs/stm3240g-eval/src/stm3240g-internal.h b/configs/stm3240g-eval/src/stm3240g-internal.h index 679951314f..2f23d252ca 100644 --- a/configs/stm3240g-eval/src/stm3240g-internal.h +++ b/configs/stm3240g-eval/src/stm3240g-internal.h @@ -117,7 +117,7 @@ * but is also connected to the Motor Control Connector (CN5) just for this * purpose: * - * PD13 FSMC_A18 / MC_TIM4_CH2 pin 33 (EnB) + * PD13 FSMC_A18 / MC_TIM4_CH2OUT pin 33 (EnB) * * FSMC must be disabled in this case! PD13 is available at: * diff --git a/configs/stm3240g-eval/src/up_pwm.c b/configs/stm3240g-eval/src/up_pwm.c index d0701b2b29..f2932cc4d1 100644 --- a/configs/stm3240g-eval/src/up_pwm.c +++ b/configs/stm3240g-eval/src/up_pwm.c @@ -61,7 +61,7 @@ * a pulse train using TIM4 CH2. This pin is used by FSMC is connect to CN5 just for this * purpose: * - * PD13 FSMC_A18 / MC_TIM4_CH2 pin 33 (EnB) + * PD13 FSMC_A18 / MC_TIM4_CH2OUT pin 33 (EnB) * * FSMC must be disabled in this case! */