Module Overview

Peripherals within the SAM4L device are capable of generating two types of actions in response to a given stimulus; they can set a register flag for later intervention by the CPU (using interrupt or polling methods), or they can generate event signals which can be internally routed directly to other peripherals within the device. The use of events allows for direct actions to be performed in one peripheral in response to a stimulus in another without CPU intervention. This can lower the overall power consumption of the system if the CPU is able to remain in sleep modes for longer periods, and lowers the latency of the system response.

The Peripheral Event System is comprised of a number of freely configurable Event Channels, plus a number of fixed Event Users. Each Event Channel can be configured to select the input peripheral that will generate the events on the channel, as well as the Event Shaper (EVS) and Input Glitch Filter (IGF) operating modes. The fixed-function Event Users, connected to peripherals within the device, can then subscribe to an Event Channel in a one-to-many relationship in order to receive events as they are generated. An overview of the event system chain is shown in Figure 1.

Figure 1. Module Overview

There are many different events that can be routed in the device, which can then trigger many different actions. For example, an Analog Comparator module could be configured to generate an event when the input signal rises above the compare threshold, which then triggers a Timer Counter module to capture the current count value for later use.