12.3.3 Priority Crossbar Decoder
The priority crossbar decoder assigns a priority to each I/O function, starting at the top with UART0. The XBRn registers are used to
control which crossbar resources are assigned to physical I/O port pins.
When a digital resource is selected, the least-significant unassigned port pin is assigned to that resource (excluding UART0, which is
always assigned to dedicated pins). If a port pin is assigned, the crossbar skips that pin when assigning the next selected resource.
Additionally, the the PnSKIP registers allow software to skip port pins that are to be used for analog functions, dedicated digital func-
tions, or GPIO. If a port pin is to be used by a function which is not assigned through the crossbar, its corresponding PnSKIP bit should
be set to 1 in most cases. The crossbar skips these pins as if they were already assigned, and moves to the next unassigned pin.
It is possible for crossbar-assigned peripherals and dedicated functions to coexist on the same pin. For example, the port match func-
tion could be configured to watch for a falling edge on a UART RX line and generate an interrupt or wake up the device from a low-
power state. However, if two functions share the same pin, the crossbar will have control over the output characteristics of that pin and
the dedicated function will only have input access. Likewise, it is possible for firmware to read the logic state of any digital I/O pin as-
signed to a crossbar peripheral, but the output state cannot be directly modified.
Figure 12.3 Crossbar Priority Decoder Example Assignments on page 96
shows an example of the resulting pin assignments of the
device with UART0 and SPI0 enabled and P0.3 skipped (P0SKIP = 0x08). UART0 is the highest priority and it will be assigned first.
The UART0 pins can only appear at fixed locations (in this example, P0.4 and P0.5), so it occupies those pins. The next-highest ena-
bled peripheral is SPI0. P0.0, P0.1 and P0.2 are free, so SPI0 takes these three pins. The fourth pin, NSS, is routed to P0.6 because
P0.3 is skipped and P0.4 and P0.5 are already occupied by the UART. Any other pins on the device are available for use as general-
purpose digital I/O or analog functions.
UART0-TX
UART0-RX
0
1
2
3
4
5
6
7
P0
Port
Pin Number
0
0
0
0
0
0
0
P0SKIP
Pin Skip Settings
SPI0-SCK
SPI0-MISO
SPI0-MOSI
SPI0-NSS
UART0 is assigned to fixed pins and has priority over SPI0.
SPI0 is assigned to available, un-skipped pins.
Port pins assigned to the associated peripheral.
P0.3 is skipped by setting P0SKIP.3 to 1.
1
Figure 12.3. Crossbar Priority Decoder Example Assignments
EFM8SB2 Reference Manual
Port I/O, Crossbar, External Interrupts, and Port Match
silabs.com
| Smart. Connected. Energy-friendly.
Rev. 0.1 | 96