34.5.3 General Purpose or Peripheral Function Selection
The PIO Controller provides multiplexing of up to 6 peripheral functions on a single pin. The selection is performed by writing the FUNC field in PIO_CFGRx. The selected function is applied to the I/O line(s) defined in PIO_MSKRx.
When FUNC is 0, no peripheral is selected and the General Purpose PIO (GPIO) mode is selected (in this mode, the I/O line is controlled by the PIO Controller).
When the value configured in PIO_CFGRx.FUNC is greater than 0, the software cannot drive the I/O line anymore and the value configured in PIO_CFGRx.FUNC defines which embedded peripheral drives the I/O lineFor more details, refer to the table Pin Description in section Package and Pinout.
Note that S_PIO_MSKRx and S_PIO_CFGRx must be used to program the FUNC field of a secure I/O line.
For more details, see PIO_CFGRx or S_PIO_CFGRx for secure I/O line configuration.
Note that multiplexing of peripheral lines affects both input and output peripheral lines. When a peripheral is not selected on any I/O line, its inputs are assigned with constant default values defined at the product level. The user must ensure that only one I/O line is affected to a peripheral input at a time.
The reset value of the FUNC field of each I/O line is defined at the product level and depends on the multiplexing of the device.