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 }