The Event System, the generating peripheral, and the peripheral(s) using the event must be
set up accordingly to utilize events:
- 1.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.
- 2.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.
- 3.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.
- 4.Configure the ADC to listen to this channel by writing to the corresponding User x
Channel MUX (EVSYS.USERx) register.