Thanks for your feedback, Please find my code below : as you suggested not used DAM , i have used simple example which is available imxrt input capture:
But still input capture is not working :means no ISR observed
Please find the function sequence
==========================
Step 1: XBARA_Init(XBARA1);
Step2 :XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputIomuxXbarInout16, kXBARA1_OutputQtimer3Tmr0Input);
Step3 :QTMR_InputCapture();
===============================
Is there any issues in the sequence ?
Note : Hardware level everything is okay
#define BOARD_QTMR_BASEADDR TMR3
#define BOARD_QTMR_INPUT_CAPTURE_CHANNEL kQTMR_Channel_0
#define BOARD_QTMR_PWM_CHANNEL kQTMR_Channel_1
#define QTMR_CounterInputPin kQTMR_Counter0InputPin
#define QTMR_IRQ_ID TMR3_IRQn
#define QTMR_IRQ_HANDLER TMR3_IRQHandler
/* Get source clock for QTMR driver */
#define QTMR_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_IpgClk)
static void BOARD_InitSensorInputPins(void);
static void QTMR_InputCapture(void);
volatile bool qtmrIsrFlag = false;
bool TestTacho = false;
uint8_t TachoCount = 0;
bool TestSppedo = false;
uint8_t SppedoCount = 0;
volatile bool xbaraIsrFlag = false;
static void QTMR_InputCapture(void)
{
qtmr_config_t qtmrConfig;
uint32_t counterClock = 0;
uint32_t timeCapt = 0;
uint32_t count = 0;
QTMR_GetDefaultConfig(&qtmrConfig);
/* Init the first channel to use the IP Bus clock div by 8 */
qtmrConfig.primarySource = kQTMR_ClockDivide_8;
QTMR_Init(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, &qtmrConfig);
/* Setup the input capture */
QTMR_SetupInputCapture(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, QTMR_CounterInputPin, false, true,
kQTMR_RisingEdge);
/* Enable at the NVIC */
EnableIRQ(QTMR_IRQ_ID);
/* Enable timer compare interrupt */
QTMR_EnableInterrupts(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_EdgeInterruptEnable);
/* Start the input channel to count on rising edge of the primary source clock */
QTMR_StartTimer(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_PriSrcRiseEdge);
counterClock = QTMR_SOURCE_CLOCK / 8000;
}
void XBAR_Configuration(void)
{
XBARA_Init(XBARA1);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputIomuxXbarInout16, kXBARA1_OutputQtimer3Tmr0Input);
QTMR_InputCapture();
}
void QTMR_IRQ_HANDLER(void)
{
/* Clear interrupt flag.*/
QTMR_ClearStatusFlags(TMR4, kQTMR_Channel_1, kQTMR_EdgeFlag);
qtmrIsrFlag = true;
}