h1r9: don't write to outputs in TIMER3 ext. match register

Writing to the output bits in the TIMER3 external match register
resulted in intermittent failures that varied in likelihood from board
to board and from commit to commit for no apparent reason.
This commit is contained in:
Michael Ossmann
2022-09-19 22:18:45 -04:00
committed by Mike Walters
parent 4db7e8d38a
commit 616705b7e5

View File

@ -52,8 +52,7 @@ void clkin_detect_init(void)
timer_set_prescaler(TIMER3, 0);
timer_set_mode(TIMER3, TIMER_CTCR_MODE_TIMER);
TIMER3_MCR = TIMER_MCR_MR0R;
TIMER3_EMR = TIMER_EMR_EM0 | TIMER_EMR_EM3 |
(TIMER_EMR_EMC_SET << TIMER_EMR_EMC0_SHIFT) |
TIMER3_EMR = (TIMER_EMR_EMC_SET << TIMER_EMR_EMC0_SHIFT) |
(TIMER_EMR_EMC_TOGGLE << TIMER_EMR_EMC3_SHIFT);
TIMER3_MR3 = MEASUREMENT_CYCLES;
TIMER3_MR0 = MEASUREMENT_CYCLES;