PPI — Programmable peripheral interconnect

The programmable peripheral interconnect (PPI) enables peripherals to interact autonomously with each other using tasks and events independent of the CPU. The PPI allows precise synchronization between peripherals when real-time application constraints exist and eliminates the need for CPU activity to implement behavior which can be predefined using PPI.

Figure 1. PPI block diagram
PPI block diagram

The PPI system has, in addition to the fully programmable peripheral interconnections, a set of channels where the event end point (EEP) and task end points (TEP) are fixed in hardware. These fixed channels can be individually enabled, disabled, or added to PPI channel groups (see CHG[n] registers), in the same way as ordinary PPI channels.

Table 1. Configurable and fixed PPI channels
InstanceChannelNumber of channels
PPI0-1920
PPI (fixed)20-3112

The PPI provides a mechanism to automatically trigger a task in one peripheral as a result of an event occurring in another peripheral. A task is connected to an event through a PPI channel. The PPI channel is composed of three end point registers, one EEP, and two TEPs. A peripheral task is connected to a TEP using the address of the task register associated with the task. Similarly, a peripheral event is connected to an EEP using the address of the event register associated with the event.

On each PPI channel, the signals are synchronized to the 16 MHz clock to avoid any internal violation of setup and hold timings. As a consequence, events that are synchronous to the 16 MHz clock will be delayed by one clock period, while other asynchronous events will be delayed by up to one 16 MHz clock period.

Note: Shortcuts (as defined in the SHORTS register in each peripheral) are not affected by this 16 MHz synchronization, and are therefore not delayed.

Each TEP implements a fork mechanism that enables a second task to be triggered at the same time as the task specified in the TEP is triggered. This second task is configured in the task end point register in the FORK registers groups, e.g. FORK.TEP[0] is associated with PPI channel CH[0].

There are two ways of enabling and disabling PPI channels:

  • Enable or disable PPI channels individually using the CHEN, CHENSET, and CHENCLR registers.
  • Enable or disable PPI channels in PPI channel groups through the groups’ ENABLE and DISABLE tasks. Prior to these tasks being triggered, the PPI channel group must be configured to define which PPI channels belong to which groups.
Note: When a channel belongs to two groups m and n, and the tasks CHG[m].EN and CHG[n].DIS occur simultaneously (m and n can be equal or different), the CHG[m].EN on that channel has priority.

PPI tasks (for example, CHG[0].EN) can be triggered through the PPI like any other task, which means they can be hooked to a PPI channel as a TEP. One event can trigger multiple tasks by using multiple channels and one task can be triggered by multiple events in the same way.

Pre-programmed channels

Some of the PPI channels are pre-programmed. These channels cannot be configured by the CPU, but can be added to groups and enabled and disabled like the general purpose PPI channels. The FORK TEP for these channels are still programmable and can be used by the application.

For a list of pre-programmed PPI channels, see the following table.

Table 2. Pre-programmed channels
ChannelEEPTEP
20TIMER0->EVENTS_COMPARE[0]RADIO->TASKS_TXEN
21TIMER0->EVENTS_COMPARE[0]RADIO->TASKS_RXEN
22TIMER0->EVENTS_COMPARE[1]RADIO->TASKS_DISABLE
23RADIO->EVENTS_BCMATCHAAR->TASKS_START
24RADIO->EVENTS_READYCCM->TASKS_KSGEN
25RADIO->EVENTS_ADDRESSCCM->TASKS_CRYPT
26RADIO->EVENTS_ADDRESSTIMER0->TASKS_CAPTURE[1]
27RADIO->EVENTS_ENDTIMER0->TASKS_CAPTURE[2]
28RTC0->EVENTS_COMPARE[0]RADIO->TASKS_TXEN
29RTC0->EVENTS_COMPARE[0]RADIO->TASKS_RXEN
30RTC0->EVENTS_COMPARE[0]TIMER0->TASKS_CLEAR
31RTC0->EVENTS_COMPARE[0]TIMER0->TASKS_START

Registers

Table 3. Instances
Base addressPeripheralInstanceDescriptionConfiguration
0x4001F000PPIPPIProgrammable peripheral interconnect  
Table 4. Register overview
RegisterOffsetDescription
TASKS_CHG[0].EN0x000Enable channel group 0 
TASKS_CHG[0].DIS0x004Disable channel group 0 
TASKS_CHG[1].EN0x008Enable channel group 1 
TASKS_CHG[1].DIS0x00CDisable channel group 1 
TASKS_CHG[2].EN0x010Enable channel group 2 
TASKS_CHG[2].DIS0x014Disable channel group 2 
TASKS_CHG[3].EN0x018Enable channel group 3 
TASKS_CHG[3].DIS0x01CDisable channel group 3 
TASKS_CHG[4].EN0x020Enable channel group 4 
TASKS_CHG[4].DIS0x024Disable channel group 4 
TASKS_CHG[5].EN0x028Enable channel group 5 
TASKS_CHG[5].DIS0x02CDisable channel group 5 
CHEN0x500Channel enable register 
CHENSET0x504Channel enable set register 
CHENCLR0x508Channel enable clear register 
CH[0].EEP0x510Channel 0 event endpoint 
CH[0].TEP0x514Channel 0 task endpoint 
CH[1].EEP0x518Channel 1 event endpoint 
CH[1].TEP0x51CChannel 1 task endpoint 
CH[2].EEP0x520Channel 2 event endpoint 
CH[2].TEP0x524Channel 2 task endpoint 
CH[3].EEP0x528Channel 3 event endpoint 
CH[3].TEP0x52CChannel 3 task endpoint 
CH[4].EEP0x530Channel 4 event endpoint 
CH[4].TEP0x534Channel 4 task endpoint 
CH[5].EEP0x538Channel 5 event endpoint 
CH[5].TEP0x53CChannel 5 task endpoint 
CH[6].EEP0x540Channel 6 event endpoint 
CH[6].TEP0x544Channel 6 task endpoint 
CH[7].EEP0x548Channel 7 event endpoint 
CH[7].TEP0x54CChannel 7 task endpoint 
CH[8].EEP0x550Channel 8 event endpoint 
CH[8].TEP0x554Channel 8 task endpoint 
CH[9].EEP0x558Channel 9 event endpoint 
CH[9].TEP0x55CChannel 9 task endpoint 
CH[10].EEP0x560Channel 10 event endpoint 
CH[10].TEP0x564Channel 10 task endpoint 
CH[11].EEP0x568Channel 11 event endpoint 
CH[11].TEP0x56CChannel 11 task endpoint 
CH[12].EEP0x570Channel 12 event endpoint 
CH[12].TEP0x574Channel 12 task endpoint 
CH[13].EEP0x578Channel 13 event endpoint 
CH[13].TEP0x57CChannel 13 task endpoint 
CH[14].EEP0x580Channel 14 event endpoint 
CH[14].TEP0x584Channel 14 task endpoint 
CH[15].EEP0x588Channel 15 event endpoint 
CH[15].TEP0x58CChannel 15 task endpoint 
CH[16].EEP0x590Channel 16 event endpoint 
CH[16].TEP0x594Channel 16 task endpoint 
CH[17].EEP0x598Channel 17 event endpoint 
CH[17].TEP0x59CChannel 17 task endpoint 
CH[18].EEP0x5A0Channel 18 event endpoint 
CH[18].TEP0x5A4Channel 18 task endpoint 
CH[19].EEP0x5A8Channel 19 event endpoint 
CH[19].TEP0x5ACChannel 19 task endpoint 
CHG[0]0x800Channel group 0 
CHG[1]0x804Channel group 1 
CHG[2]0x808Channel group 2 
CHG[3]0x80CChannel group 3 
CHG[4]0x810Channel group 4 
CHG[5]0x814Channel group 5 
FORK[0].TEP0x910Channel 0 task endpoint 
FORK[1].TEP0x914Channel 1 task endpoint 
FORK[2].TEP0x918Channel 2 task endpoint 
FORK[3].TEP0x91CChannel 3 task endpoint 
FORK[4].TEP0x920Channel 4 task endpoint 
FORK[5].TEP0x924Channel 5 task endpoint 
FORK[6].TEP0x928Channel 6 task endpoint 
FORK[7].TEP0x92CChannel 7 task endpoint 
FORK[8].TEP0x930Channel 8 task endpoint 
FORK[9].TEP0x934Channel 9 task endpoint 
FORK[10].TEP0x938Channel 10 task endpoint 
FORK[11].TEP0x93CChannel 11 task endpoint 
FORK[12].TEP0x940Channel 12 task endpoint 
FORK[13].TEP0x944Channel 13 task endpoint 
FORK[14].TEP0x948Channel 14 task endpoint 
FORK[15].TEP0x94CChannel 15 task endpoint 
FORK[16].TEP0x950Channel 16 task endpoint 
FORK[17].TEP0x954Channel 17 task endpoint 
FORK[18].TEP0x958Channel 18 task endpoint 
FORK[19].TEP0x95CChannel 19 task endpoint 
FORK[20].TEP0x960Channel 20 task endpoint 
FORK[21].TEP0x964Channel 21 task endpoint 
FORK[22].TEP0x968Channel 22 task endpoint 
FORK[23].TEP0x96CChannel 23 task endpoint 
FORK[24].TEP0x970Channel 24 task endpoint 
FORK[25].TEP0x974Channel 25 task endpoint 
FORK[26].TEP0x978Channel 26 task endpoint 
FORK[27].TEP0x97CChannel 27 task endpoint 
FORK[28].TEP0x980Channel 28 task endpoint 
FORK[29].TEP0x984Channel 29 task endpoint 
FORK[30].TEP0x988Channel 30 task endpoint 
FORK[31].TEP0x98CChannel 31 task endpoint 

TASKS_CHG[n].EN (n=0..5)

Address offset: 0x000 + (n × 0x8)

Enable channel group n

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWEN  Enable channel group n
   Trigger1Trigger task

TASKS_CHG[n].DIS (n=0..5)

Address offset: 0x004 + (n × 0x8)

Disable channel group n

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWDIS  Disable channel group n
   Trigger1Trigger task

CHEN

Address offset: 0x500

Channel enable register

Bit number313029282726252423222120191817161514131211109876543210
IDfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
A-TRWCH[i] (i=0..19)  Enable or disable channel i
   Disabled0Disable channel
   Enabled1Enable channel
U-fRWCH[i] (i=20..31)  Enable or disable channel i
   Disabled0Disable channel
   Enabled1Enable channel

CHENSET

Address offset: 0x504

Channel enable set register

Read: reads value of CH{i} field in CHEN register.

Bit number313029282726252423222120191817161514131211109876543210
IDfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
A-TRWCH[i] (i=0..19)  Channel i enable set register. Writing '0' has no effect.
   Disabled0Read: channel disabled
   Enabled1Read: channel enabled
   Set1Write: Enable channel
U-fRWCH[i] (i=20..31)  Channel i enable set register. Writing '0' has no effect.
   Disabled0Read: channel disabled
   Enabled1Read: channel enabled
   Set1Write: Enable channel

CHENCLR

Address offset: 0x508

Channel enable clear register

Read: reads value of CH{i} field in CHEN register.

Bit number313029282726252423222120191817161514131211109876543210
IDfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
A-TRWCH[i] (i=0..19)  Channel i enable clear register. Writing '0' has no effect.
   Disabled0Read: channel disabled
   Enabled1Read: channel enabled
   Clear1Write: disable channel
U-fRWCH[i] (i=20..31)  Channel i enable clear register. Writing '0' has no effect.
   Disabled0Read: channel disabled
   Enabled1Read: channel enabled
   Clear1Write: disable channel

CH[n].EEP (n=0..19)

Address offset: 0x510 + (n × 0x8)

Channel n event endpoint

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWEEP  Pointer to event register. Accepts only addresses to registers from the Event group.

CH[n].TEP (n=0..19)

Address offset: 0x514 + (n × 0x8)

Channel n task endpoint

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWTEP  Pointer to task register. Accepts only addresses to registers from the Task group.

CHG[n] (n=0..5)

Address offset: 0x800 + (n × 0x4)

Channel group n

Bit number313029282726252423222120191817161514131211109876543210
IDfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
A-TRWCH[i] (i=0..19)  Include or exclude channel i
   Excluded0Exclude
   Included1Include
U-fRWCH[i] (i=20..31)  Include or exclude channel i
   Excluded0Exclude
   Included1Include

FORK[n].TEP (n=0..19, 20..31)

Address offset: 0x910 + (n × 0x4)

Channel n task endpoint

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWTEP  Pointer to task register