The DPPI system directs peripheral events to a channel (publishing) and converts events from a channel into peripheral tasks (subscribing).
All peripherals include the following:
- One publish register per event
- One subscribe register per task
The publish and subscribe registers have two fields. A channel index field (CHIDX) determines which channel an event is published to, or which channel a task is subscribed to. In addition there is an ENABLE field that must be set to 1 to activate the operation.
Writing non-existing channel index (CHIDX) numbers into a peripheral's publish or subscribe registers will yield unexpected results.
One event can trigger multiple tasks by subscribing different tasks to the same channel. Similarly, one task can be triggered by multiple events by publishing different events to the same channel. For advanced use cases, multiple events and multiple tasks can connect to the same channel forming a many-to-many connection. If multiple events are published on the same channel at the same time, the events are merged and only one event is routed through the DPPI.
The following figure shows how peripheral events are routed onto different channels based on publish registers.
The following figure illustrates how peripheral tasks are triggered from different channels based on subscribe registers.