Other Parts Discussed in Thread: LMT01
Tool/software: TI-RTOS
I'm having trouble setting up the comparator to trigger an interrupt.
I have an LMT01 generating a pulse train into the analog pin 23 with a reference on pin 24.
Configuration/Setup:
//Enable clocks for peripherals in the AUX domain. ADC Digital and Analog interface (not currently enabled in driver).
AUXWUCClockEnable(AUX_WUC_MODCLKEN0_AUX_ADI4_M);
HapiSelectCompARef(COMPA_IN_AUXIO0); //AUXIO0 = DIO 23 as reference in COMPA
HapiSelectCompAInput(COMPA_IN_AUXIO1); //AUXIO1 = DIO 24 as Input in COMPA
//Setup COMPA
HWREGB(AUX_ADI4_BASE + ADI_4_AUX_O_COMP) = ADI_4_AUX_COMP_COMPA_EN;
HWREG(AUX_EVCTL_BASE + AUX_EVCTL_O_COMBEVTOMCUMASK) |= AUX_EVCTL_COMBEVTOMCUMASK_AUX_COMPA;
Power_setConstraint(PowerCC26XX_SB_DISALLOW);
How do i configure the output of the comparator to a DIO on the LAUNCHXL?
How do i configure the comparator to trigger and interrupt?