microwire_master: fix register redefinition
This commit is contained in:
parent
0454647d2d
commit
55e44d4c5e
|
@ -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
|
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_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)
|
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
|
timer_enable_irq(TIM(MICROWIRE_MASTER_TIMER), TIM_DIER_UIE); // enable update interrupt for timer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue