MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
INPUTMUX: Input Multiplexing Driver

Overview

The MCUXpresso SDK provides a driver for the Input multiplexing (INPUTMUX).
It configures the inputs to the pin interrupt block, DMA trigger, and frequency measure function. Once configured, the clock is not needed for the inputmux.

Input Multiplexing Driver operation

INPUTMUX_AttachSignal function configures the specified input

Typical use case

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/inputmux

Files

file  fsl_inputmux.h
 
file  fsl_inputmux_connections.h
 

Macros

#define SCT0_PMUX_ID   0x00U
 Periphinmux IDs.
 

Enumerations

enum  inputmux_connection_t {
  kINPUTMUX_Gpio3Inp0ToSct0 = 0U + (SCT0_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_DebugHaltedToSct0 = 23U + (SCT0_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_GpioPort1Pin31ToPintsel = 63U + (PINTSEL_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_AvpllCh2ClkoutToFreqmeas = 27U + (FREQMEAS_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_FlexcommDmaCmpltDone1ToTimer0CaptureChannels = 25U + (CT32BIT0_CAP_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_BtuHostTrigger2ToTimer1CaptureChannels = 21U + (CT32BIT1_CAP_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_FlexcommDmaCmpltDone1ToTimer2CaptureChannels = 25U + (CT32BIT2_CAP_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_BtuHostTrigger2ToTimer3CaptureChannels = 21U + (CT32BIT3_CAP_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_LcdTxRegToDmaSingleToDma0 = 33U + (DMA0_ITRIG_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_LcdTxRegToDmaSingleToDma1 = 33U + (DMA1_ITRIG_PMUX_ID << PMUX_SHIFT) ,
  kINPUTMUX_Dma0OtrigChannel32ToTriginChannels = 32U + (DMA0_OTRIG_PMUX_ID << PMUX_SHIFT)
}
 INPUTMUX connections type. More...
 
enum  inputmux_signal_t {
  kINPUTMUX_Dmac0InputTriggerPint0Ena = 0U + (DMA0_ITRIG_EN0_ID << ENA_SHIFT) ,
  kINPUTMUX_Dmac0InputTriggerLcdTxRegToDmaSingleEna = 1U + (DMA0_ITRIG_EN1_ID << ENA_SHIFT) ,
  kINPUTMUX_Dmac1InputTriggerLcdTxRegToDmaSingleEna = 1U + (DMA1_ITRIG_EN1_ID << ENA_SHIFT) ,
  kINPUTMUX_Flexcomm14TxToDmac0Ch27RequestEna = 27U + (DMA0_REQ_ENA0_ID << ENA_SHIFT)
}
 INPUTMUX signal enable/disable type. More...
 

Functions

void INPUTMUX_Init (INPUTMUX_Type *base)
 Initialize INPUTMUX peripheral. More...
 
void INPUTMUX_AttachSignal (INPUTMUX_Type *base, uint32_t index, inputmux_connection_t connection)
 Attaches a signal. More...
 
void INPUTMUX_EnableSignal (INPUTMUX_Type *base, inputmux_signal_t signal, bool enable)
 Enable/disable a signal. More...
 
void INPUTMUX_Deinit (INPUTMUX_Type *base)
 Deinitialize INPUTMUX peripheral. More...
 

Driver version

#define FSL_INPUTMUX_DRIVER_VERSION   (MAKE_VERSION(2, 0, 7))
 Group interrupt driver version for SDK.
 

Enumeration Type Documentation

Enumerator
kINPUTMUX_Gpio3Inp0ToSct0 

SCT INMUX.

kINPUTMUX_DebugHaltedToSct0 

Pin Interrupt.

kINPUTMUX_GpioPort1Pin31ToPintsel 

Frequency measure.

kINPUTMUX_AvpllCh2ClkoutToFreqmeas 

CTmier0 capture input mux.

kINPUTMUX_FlexcommDmaCmpltDone1ToTimer0CaptureChannels 

CTmier1 capture input mux.

kINPUTMUX_BtuHostTrigger2ToTimer1CaptureChannels 

CTmier2 capture input mux.

kINPUTMUX_FlexcommDmaCmpltDone1ToTimer2CaptureChannels 

CTmier3 capture input mux.

kINPUTMUX_BtuHostTrigger2ToTimer3CaptureChannels 

DMA0 ITRIG.

kINPUTMUX_LcdTxRegToDmaSingleToDma0 

DMA1 ITRIG.

kINPUTMUX_LcdTxRegToDmaSingleToDma1 

DMA0 OTRIG.

kINPUTMUX_Dma0OtrigChannel32ToTriginChannels 

DMA1 OTRIG.

Enumerator
kINPUTMUX_Dmac0InputTriggerPint0Ena 

DMA0 input trigger source enable.

kINPUTMUX_Dmac0InputTriggerLcdTxRegToDmaSingleEna 

DMA1 input trigger source enable.

kINPUTMUX_Dmac1InputTriggerLcdTxRegToDmaSingleEna 

DMA0 REQ signal.

kINPUTMUX_Flexcomm14TxToDmac0Ch27RequestEna 

DMA1 REQ signal.

Function Documentation

void INPUTMUX_Init ( INPUTMUX_Type *  base)

This function enables the INPUTMUX clock.

Parameters
baseBase address of the INPUTMUX peripheral.
Return values
None.
void INPUTMUX_AttachSignal ( INPUTMUX_Type *  base,
uint32_t  index,
inputmux_connection_t  connection 
)

This function attaches multiplexed signals from INPUTMUX to target signals. For example, to attach GPIO PORT0 Pin 5 to PINT peripheral, do the following:

* INPUTMUX_AttachSignal(INPUTMUX, 2, kINPUTMUX_GpioPort0Pin5ToPintsel);
*

In this example, INTMUX has 8 registers for PINT, PINT_SEL0~PINT_SEL7. With parameter index specified as 2, this function configures register PINT_SEL2.

Parameters
baseBase address of the INPUTMUX peripheral.
indexThe serial number of destination register in the group of INPUTMUX registers with same name.
connectionApplies signal from source signals collection to target signal.
Return values
None.
void INPUTMUX_EnableSignal ( INPUTMUX_Type *  base,
inputmux_signal_t  signal,
bool  enable 
)

This function gates the INPUTPMUX clock.

Parameters
baseBase address of the INPUTMUX peripheral.
signalEnable signal register id and bit offset.
enableSelects enable or disable.
Return values
None.
void INPUTMUX_Deinit ( INPUTMUX_Type *  base)

This function disables the INPUTMUX clock.

Parameters
baseBase address of the INPUTMUX peripheral.
Return values
None.