1.1.2 I/O Pin Input (IO)
I/O pins can be applied as inputs for the LUTs. An overview of available LUT I/O pins can be found in the "PORT Function Multiplexing" table in the "I/O Multiplexing and Considerations" chapter in the device datasheet. I/O pin input is selected by writing the Input y Source Selection bit group in the LUT Control x register (LUTCTRLx.INSELy) to 0x4.
To enable a peripheral function on a pin, the Peripheral Multiplexer
Enable bit in the Pin Configuration register (PINCFGn.PMUXEN) corresponding
to specific pin must be written to one. The selection of peripheral function
is done by writing to the Peripheral Multiplexing Odd and Even bits in the
Peripheral Multiplexing register (PMUXn.PMUXE/O). The following code example
shows how an I/O pin is multiplexed as LUT0 input 0 using
ASF:
struct system_pinmux_config lut0_out_pin_conf; system_pinmux_get_config_defaults(&lut0_out_pin_conf); lut0_out_pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT; lut0_out_pin_conf.mux_position = MUX_CCL_OUTPUT; system_pinmux_pin_set_config(PIN_CCL_OUTPUT, &lut0_out_pin_conf);
Note: Not all LUTs can be
connected to pins on the lower pin count devices.