43.6.2.4 Truth Table Inputs Selection

Input Overview

The inputs can be individually:

  • Masked
  • Driven by peripherals:
    • Analog comparator output (AC)
    • Timer/Counters waveform outputs (TC)
    • Serial Communication output transmit interface (SERCOM)
  • Driven by internal events from Event System
  • Driven by other CCL sub-modules

The Input Selection for each input ‘y’ of LUT x is configured by writing the Input ‘y’ Source Selection bit in the LUT x Control register (LUTCTRLx.INSELy).

Masked Inputs (MASK)

When a LUT input is masked (LUTCTRLx.INSELy = MASK), the corresponding TRUTH input (IN) is internally tied to zero, as shown in this figure:

Figure 43-3. Masked Input Selection

Internal Feedback Inputs (FEEDBACK)

When selected (LUTCTRLx.INSELy = FEEDBACK), the Sequential (SEQ) output is used as input for the corresponding LUT.

The output from an internal sequential sub-module can be used as input source for the LUT, see figure below for an example for LUT0 and LUT1. The sequential selection for each LUT follows the formula:

I N [ 2 N ] [ i ] = SEQ [ N ]
I N [ 2 N +1 ] [ i ] = SEQ [ N ]

With N representing the sequencer number and i=0,1,2 representing the LUT input index.

For additional information, refer to 43.6.2.7 Sequential Logic.

Figure 43-4. Feedback Input Selection

Linked LUT (LINK)

When selected (LUTCTRLx.INSELy=LINK), the subsequent LUT output is used as the LUT input (for example, LUT2 is the input for LUT1), as shown in the figure below:

Figure 43-5. Linked LUT Input Selection

I/O Pin Inputs (IO)

When the I/O pin is selected as LUT input (LUTCTRLx.INSELy = IO), the corresponding LUT input will be connected to the pin, as shown in the figure below.

Figure 43-6. I/O Pin Input Selection

Analog Comparator Inputs (AC)

The AC outputs can be used as input source for the LUT (LUTCTRLx.INSELy=AC).

The analog comparator outputs are distributed following the formula:

IN[N][i]=AC[N % ComparatorOutput_Number]

With N representing the LUT number and i=[0,1,2] representing the LUT input index.

Before selecting the comparator output, the AC must be configured first.

The output of comparator 0 is available on even LUTs ("LUT(2x)": LUT0, LUT2) and the comparator 1 output is available on odd LUTs ("LUT(2x+1)": LUT1, LUT3), as shown in the figure below.

Figure 43-7. AC Input Selection

Timer/Counter Inputs (TC)

The TC waveform output WO[0] can be used as input source for the LUT (LUTCTRLx.INSELy = TC). Only consecutive instances of the TC, that is, TCx and the subsequent TC(x+1), are available as default and alternative TC selections (for example, TC0 and TC1 are sources for LUT0, TC1 and TC2 are sources for LUT1). See the figure below for an example for LUT0. More general, the Timer/Counter selection for each LUT follows the formula:

IN [ N ] [ i ] = D e f a u l t T C [ N % TC_Instance_Number ]
IN [ N ] [ i ] = A l t e r n a t i v e T C [ ( N + 1 ) % TC_Instance_Number ]

Where N represents the LUT number and i represents the LUT input index (i=0,1,2).

Note that for not implemented TC_Instance_Number, the corresponding input is tied to ground.

Before selecting the waveform outputs, the TC must be configured first.

Figure 43-8. TC Input Selection

Timer/Counter for Control Application Inputs (TCC)

The TCC waveform outputs can be used as input source for the LUT. Only WO[2:0] outputs can be selected and routed to the respective LUT input (that is, IN0 is connected to WO0, IN1 to WO1, and IN2 to WO2), as shown in the figure below.

Note:

The TCC selection for each LUT follows the formula:

IN [ N ] [ i ] = T C C [ N % T C C_Instance_Number ] . W O [ i ]

Where N represents the LUT number and i represents the LUT input index (i=0,1,2).

Before selecting the waveform outputs, the TCC must be configured first.

Note: TCC2 only outputs 2 WO signals, so TCC2.WO[0] is connected to both LUT2.IN[0] and LUT2.IN[2], and TCC2.WO[1] is connected to LUT2.IN[1].
Figure 43-9. TCC Input Selection

Serial Communication Output Transmit Inputs (SERCOM)

The serial engine transmitter output from Serial Communication Interface (SERCOM TX, TXd for USART, MOSI for SPI) can be used as input source for the LUT. The figure below shows an example for LUT0 and LUT1. The SERCOM selection for each LUT follows the formula:

IN [ N ] [ i ] = S E R C O M [ N % SERCOM_Instance_Number ]

With N representing the LUT number and i=0,1,2 representing the LUT input index.

Before selecting the SERCOM as input source, the SERCOM must be configured first: the SERCOM TX signal must be output on SERCOMn/pad[0], which serves as input pad to the CCL.

Figure 43-10. SERCOM Input Selection