From 92f566a2c1bf6edbb763f547c1c62b82e4dcb0fe Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 25 Feb 2012 18:01:44 +0000 Subject: [PATCH] Misc quad encoder updates git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4426 42af7a65-404d-4744-a932-0658087f49c3 --- configs/stm32f4discovery/README.txt | 6 ++++-- configs/stm32f4discovery/nsh/defconfig | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index 5ea25c0c8de..70075220a01 100755 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -736,8 +736,10 @@ Where is one of the following: but this must be manually enabled by selecting: CONFIG_QENCODER=y : Enable the generic Quadrature Encoder infrastructure - CONFIG_STM32_TIM2=y : Enable TIM2 - CONFIG_STM32_TIM2_QE=y : Use TIM2 as the quadrature encoder + CONFIG_STM32_TIM8=y : Enable TIM8 + CONFIG_STM32_TIM2=n : (Or optionally TIM2) + CONFIG_STM32_TIM8_QE=y : Use TIM8 as the quadrature encoder + CONFIG_STM32_TIM2_QE=y : (Or optionally TIM2) See also apps/examples/README.txt diff --git a/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index fead7980dfa..5bc628323e2 100755 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/configs/stm32f4discovery/nsh/defconfig @@ -327,12 +327,18 @@ CONFIG_STM32_TIM4_CHANNEL=2 # # Quadrature Encoder configuration. # -# Uses TIM2 or TIM8. TIM2 also needs CONFIG_STM32_TIM2=y; TIM8 needs CONFIG_STM_TIM8 above. -# +# CONFIG_QENCODER - Enables the upper-half quadrature encoder driver +# CONFIG_STM32_TIMn - Enables TIMn +# CONFIG_STM32_TIMn_QE - Configures TIMn as a quadrature encoder +# CONFIG_STM32_TIMn_QECLKOUT - Used to configure the TIMn prescaler value +# +# Uses TIM2 or TIM8. TIM2 also needs CONFIG_STM32_TIM2=y; TIM8 needs CONFIG_STM_TIM8=y above. # CONFIG_QENCODER=n CONFIG_STM32_TIM2_QE=n +CONFIG_STM32_TIM2_QECLKOUT=28000000 CONFIG_STM32_TIM8_QE=y +CONFIG_STM32_TIM8_QECLKOUT=28000000 # # General build options