summaryrefslogtreecommitdiff
path: root/digital/io-hub
diff options
context:
space:
mode:
authorNicolas Schodet2013-03-23 12:23:46 +0100
committerNicolas Schodet2013-03-23 13:03:02 +0100
commit64c1debd706b42091533a8766a2affaad25b31cf (patch)
tree454f21668de6661b328bc7388af95694a41d3b14 /digital/io-hub
parentc0c56cdd5ba5d38ebe1b866aeb619fbf997d6462 (diff)
digital/io-hub/src/apbirthday: fix timer initialisation order
Diffstat (limited to 'digital/io-hub')
-rw-r--r--digital/io-hub/src/apbirthday/hardware.stm32.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/digital/io-hub/src/apbirthday/hardware.stm32.cc b/digital/io-hub/src/apbirthday/hardware.stm32.cc
index 53420a45..8eb6f5a5 100644
--- a/digital/io-hub/src/apbirthday/hardware.stm32.cc
+++ b/digital/io-hub/src/apbirthday/hardware.stm32.cc
@@ -82,10 +82,10 @@ Hardware::Hardware ()
main_i2c.enable ();
// Cycle timer, 4 ms period.
rcc_peripheral_enable_clock (&RCC_APB1ENR, RCC_APB1ENR_TIM3EN);
- TIM3_CR1 = TIM_CR1_CEN;
TIM3_PSC = 2 * rcc_ppre1_frequency / 1000000 - 1; // 1 ┬Ás prescaler
TIM3_ARR = 4000 - 1;
TIM3_EGR = TIM_EGR_UG;
+ TIM3_CR1 = TIM_CR1_CEN;
}
void