microwire_master: fix register redefinition

This commit is contained in:
King Kévin 2020-02-17 14:05:34 +01:00
parent 0454647d2d
commit 55e44d4c5e
1 changed files with 1 additions and 1 deletions

View File

@ -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
}