summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_timerisr.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-09-28 19:14:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-09-28 19:14:37 +0000
commitfa0e1e5d0b4bbbeb2af68e1517997dba6ef60ec9 (patch)
tree407649dda3a972888a1f1b3ddfb3592716cbf94a /nuttx/arch/arm/src/stm32/stm32_timerisr.c
parenta76921a3c964a7f32b973d9f676c92f84d63442f (diff)
downloadpx4-nuttx-fa0e1e5d0b4bbbeb2af68e1517997dba6ef60ec9.tar.gz
px4-nuttx-fa0e1e5d0b4bbbeb2af68e1517997dba6ef60ec9.tar.bz2
px4-nuttx-fa0e1e5d0b4bbbeb2af68e1517997dba6ef60ec9.zip
Add RCC support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2101 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_timerisr.c')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_timerisr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_timerisr.c b/nuttx/arch/arm/src/stm32/stm32_timerisr.c
index d25448391..32c51de59 100644
--- a/nuttx/arch/arm/src/stm32/stm32_timerisr.c
+++ b/nuttx/arch/arm/src/stm32/stm32_timerisr.c
@@ -61,11 +61,13 @@
* system clock ticks per second. That value is a user configurable setting
* that defaults to 100 (100 ticks per second = 10 MS interval).
*
- * The timer counts at the rate SYSCLK_FREQUENCY as defined in the board.h
- * header file.
+ * The RCC feeds the Cortex System Timer (SysTick) with the AHB clock (HCLK)
+ * divided by 8. The SysTick can work either with this clock or with the
+ * Cortex clock (HCLK), configurable in the SysTick Control and Status
+ * register.
*/
-#define SYSTICK_RELOAD ((SYSCLK_FREQUENCY / CLK_TCK) - 1)
+#define SYSTICK_RELOAD ((STM32_HCLK_FREQUENCY / 8 / CLK_TCK) - 1)
/* The size of the reload field is 24 bits. Verify taht the reload value
* will fit in the reload register.