diff options
author | px4dev <px4@purgatory.org> | 2012-11-03 01:10:32 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-11-03 01:14:25 -0700 |
commit | f11cf48bb9e41dfbb20df898c2f7409441890651 (patch) | |
tree | daae49b031d751f62acba98d01a06626f94416dd | |
parent | ccc7b1318558deefa29dc75ce0fa015d33ffc81b (diff) | |
download | px4-firmware-f11cf48bb9e41dfbb20df898c2f7409441890651.tar.gz px4-firmware-f11cf48bb9e41dfbb20df898c2f7409441890651.tar.bz2 px4-firmware-f11cf48bb9e41dfbb20df898c2f7409441890651.zip |
Attach the interrupt before powering on the HRT timer.
-rw-r--r-- | apps/drivers/stm32/drv_hrt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/drivers/stm32/drv_hrt.c b/apps/drivers/stm32/drv_hrt.c index 0474960d0..6ac46092b 100644 --- a/apps/drivers/stm32/drv_hrt.c +++ b/apps/drivers/stm32/drv_hrt.c @@ -386,12 +386,12 @@ static void hrt_ppm_decode(uint32_t status); static void hrt_tim_init(void) { - /* clock/power on our timer */ - modifyreg32(HRT_TIMER_POWER_REG, 0, HRT_TIMER_POWER_BIT); - /* claim our interrupt vector */ irq_attach(HRT_TIMER_VECTOR, hrt_tim_isr); + /* clock/power on our timer */ + modifyreg32(HRT_TIMER_POWER_REG, 0, HRT_TIMER_POWER_BIT); + /* disable and configure the timer */ rCR1 = 0; rCR2 = 0; @@ -582,7 +582,7 @@ hrt_absolute_time(void) { hrt_abstime abstime; uint32_t count; - uint32_t flags; + irqstate_t flags; /* * Counter state. Marked volatile as they may change |