11.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 11.3 Crossbar Priority Decoder Example Assignments on page 98
shows an example of the resulting pin assignments of the
device with UART1 and SPI0 enabled and P0.3 skipped (P0SKIP = 0x08). UART1 is the highest priority when URT1EL in XBR0 is set
to 1 and it will be assigned first. When URT1EL is set to 1, the UART1 pins can only appear at fixed locations (P0.4 and P0.5), so it
occupies those pins. The next-highest enabled 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.
UART1-TX
UART1-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
UART1 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 11.3. Crossbar Priority Decoder Example Assignments
Note:
UART1 pins appear in P0.4 and P0.5 when URT1EL is set in the XBR0 register for backwards compatibility with UART0 place-
ment on other devices. When URT1E in the XBR2 register is set, UART1 is available on any crossbar pin in standard priority order.
EFM8UB3 Reference Manual
Port I/O, Crossbar, External Interrupts, and Port Match
silabs.com
| Building a more connected world.
Rev. 0.2 | 98