1
’ to the Start Event Input bit (STARTEI) in the Event Control
register (ADCn.EVCTRL).ADC0.EVCTRL |= ADC_STARTEI_bm;
Any incoming event routed to the ADC through the Event System (EVSYS) will trigger an ADC conversion. The event trigger input is edge sensitive. When an event occurs, STCONV in ADCn.COMMAND is set. STCONV will be cleared when the conversion is complete.
EVSYS.CHANNEL0 = EVSYS_GENERATOR_RTC_OVF_gc; /* Real Time Counter overflow */ EVSYS.USERADC0 = EVSYS_CHANNEL_CHANNEL0_gc; /* Connect user to event channel 0 */ ADC0.EVCTRL |= ADC_STARTEI_bm; /* Enable event triggered conversion */