30.6.2.1 Initialization
Before enabling event routing within the system, the Event Users Multiplexer and Event Channels must be selected in the Event System (EVSYS), and the two peripherals that generate and use the event must be configured. Follow these steps to configure the event:
- In the peripheral generating the event, enable the output of the event by writing a ‘
1
’ to the respective Event Output Enable bit (EO) in the peripheral's Event Control register, for example, AC.EVCTRL.WINEO0 or RTC.EVCTRL.OVFEO. - Configure the EVSYS:
- Configure the Event User multiplexer by writing the respective EVSYS.USERm register; see User Multiplexer Setup from Related Links.
- Configure the Event Channel by writing the respective EVSYS.CHANNELn register; see Event System Channel from Related Links.
- Configure the action to be executed by the event user peripheral by writing to the Event Action bits (EVACT) in the respective Event control register, for example, TC.EVCTRL.EVACT. Note: This step is not applicable for all the peripherals.
- In the event it is a user peripheral, enable event input by writing a ‘
1
’ to the respective Event Input Enable bit ("EI") in the peripheral's Event Control register, for example, AC.EVCTRL.IVEI0.Note: The ADC, CVD and ZB modules do not have the EVCTRL register; therefore, the EVCTRL register configuration is not applicable for these modules.