The PPIBus can route peripheral events onto the channels (publishing), or route events from the channels into peripheral tasks (subscribing).
All peripherals include the following:
- One subscribe register per task
- One publish register per event
Publish and subscribe registers use a channel index field to determine the channel to which the event is published or tasks subscribed. In addition, there is an enable bit for the subscribe and publish registers that needs to be enabled before the subscription or publishing takes effect.
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.
How peripheral events are routed onto different channels based on publish registers is illustrated in the following figure.
The following figure illustrates how peripheral tasks are triggered from different channels based on subscribe registers.