The SAM D20 boasts a number of power-saving techniques, including an event system that allows peripherals to communicate directly with each other without involving the CPU or bus resources. This is known as the Peripheral Event System.
According to Andreas Eieland, Sr. Product Marketing Manager at Atmel, the Peripheral Event System can best be described as a routing network independent of the traditional data bus paths. Meaning, different triggers at the peripheral level can result in an event, like a timer tick triggering a reaction in another peripheral.
“Comprising 8 independent channels, the Event System offers a fixed latency of 2 cycles. Without any jitter it is a 100% deterministic method and a perfect fit for real-time applications,” Eieland explained.
“No events are lost and they are handled at a peripheral level in two cycles, even if the CPU is performing a non maskable interrupt. Traditionally the way of handling actions for a low power application would be through the use of interrupts, although they wake up the CPU.”
To better illustrate the advantages of an Event System, Eieland cited an example of a motor drive application using PWM.
“To detect erroneous situations, many motor applications use an analog comparator or ADC to measure the current going into the motor drive, in an over current situation you want to shut down the PWM channels driving the motor as soon as you can to prevent permanent damage to the circuit and for safety reasons,” he said.
“Without an Event System the overcurrent situation will trigger an interrupt, but the interrupt service request might be delayed if the CPU is performing other higher priority tasks. Using the Event System you can connect the analog comparator or ADC directly to the timer and always shut down the timer in two cycles, regardless of what the rest of the MCU is doing.”
Although Peripheral Event capabilities are useful on many different levels, the primary advantages of such a feature include minimizing power consumption, optimizing the off-loading of routine tasks from the CPU and achieving a totally predictable reaction time.
Additional information about Atmel’s Peripheral Event System can be found here.