h1r9: fix Opera Cake time mode compatibility
TIMER3 match register 3 was interfering with SCT, fixed by turning off all ORing of timer outputs with SCT outputs.
This commit is contained in:

committed by
Mike Walters

parent
7b5d8da821
commit
dc67fbd2ee
@ -23,6 +23,7 @@
|
||||
#include <libopencm3/lpc43xx/timer.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/gima.h>
|
||||
#include <libopencm3/lpc43xx/creg.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define CLOCK_CYCLES_1_MS (204000)
|
||||
@ -56,6 +57,7 @@ void clkin_detect_init(void)
|
||||
(TIMER_EMR_EMC_TOGGLE << TIMER_EMR_EMC3_SHIFT);
|
||||
TIMER3_MR3 = MEASUREMENT_CYCLES;
|
||||
TIMER3_MR0 = MEASUREMENT_CYCLES;
|
||||
CREG_CREG6 |= CREG_CREG6_CTOUTCTRL;
|
||||
|
||||
/* Timer0 counts CLKIN */
|
||||
timer_set_prescaler(TIMER0, 0);
|
||||
|
Reference in New Issue
Block a user