From 55e44d4c5edefa9b5f8fd59367ecc4cbf8498350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 17 Feb 2020 14:05:34 +0100 Subject: [PATCH] microwire_master: fix register redefinition --- lib/microwire_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/microwire_master.c b/lib/microwire_master.c index bdb8c24..bd1a6c0 100644 --- a/lib/microwire_master.c +++ b/lib/microwire_master.c @@ -82,7 +82,7 @@ void microwire_master_setup(uint32_t frequency, bool organization_x16, uint8_t a uint16_t period = (rcc_ahb_frequency/prescaler)/(frequency*2); // calculate period to get most accurate timing based on the calculated prescaler timer_set_period(TIM(MICROWIRE_MASTER_TIMER), period-1); // set calculated period timer_update_on_overflow(TIM(MICROWIRE_MASTER_TIMER)); // only use counter overflow as UEV source (use overflow as timeout) - SCB_SCR |= SCB_SCR_SEVEONPEND; // enable wake up on event (instead of using ISR) + SCB_SCR |= SCB_SCR_SEVONPEND; // enable wake up on event (instead of using ISR) timer_enable_irq(TIM(MICROWIRE_MASTER_TIMER), TIM_DIER_UIE); // enable update interrupt for timer }