14.3.1 Initialization
The Event System, the generating peripheral, and the peripheral(s) using the event must be set up accordingly to utilize events:
- Configure the generating peripheral appropriately. For example, if the generating peripheral is a timer, set the prescaling, the Compare register, etc., so that the desired event is generated.
- Configure the event user peripheral(s) appropriately. For example, if the ADC is the event user, set the ADC prescaler, resolution, conversion time, etc., as desired, and configure the ADC conversion to start on the reception of an event.
- Configure the Event System to route the desired source. In this case, the Timer/Compare match to the desired event channel, which may for example, be channel 0, which is accomplished by writing to the Channel 0 Generator Selection (EVSYS.CHANNEL0) register.
- Configure the ADC to listen to this channel by writing to the corresponding User x Channel MUX (EVSYS.USERx) register.