<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.MX.RT 1050 - XBAR and Quad timer input capture function - interrupt is not triggered in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1393089#M185171</link>
    <description>&lt;P&gt;Dear jeremyzhou,&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;You have provided an accurate solution to my problem and&lt;/DIV&gt;&lt;DIV class=""&gt;allow me to make further progress. The problem has been fixed.&lt;/DIV&gt;&lt;DIV class=""&gt;I appreciate your prompt reply very much.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you!&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Yours Sincerely,&lt;/DIV&gt;&lt;DIV class=""&gt;Cindy&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 29 Dec 2021 15:07:19 GMT</pubDate>
    <dc:creator>Cindy</dc:creator>
    <dc:date>2021-12-29T15:07:19Z</dc:date>
    <item>
      <title>i.MX.RT 1050 - XBAR and Quad timer input capture function - interrupt is not triggered</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1392757#M185125</link>
      <description>&lt;P&gt;I modified the qtmr input capture example so that I can feed PWM signal to pin-GPIO_AD_B0_09. I am trying to connect this input to a qtmr using Xbar. The PWM freq is 2KHz and duty cycle is 50%. However, the interrupt is not happening. Could you please tell me what is missing from the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include "fsl_debug_console.h"&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "clock_config.h"&lt;BR /&gt;#include "board.h"&lt;BR /&gt;#include "fsl_qtmr.h"&lt;BR /&gt;#include "fsl_iomuxc.h"&lt;BR /&gt;#include "fsl_xbara.h"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define BOARD_QTMR_BASEADDR TMR1&lt;BR /&gt;#define BOARD_QTMR_INPUT_CAPTURE_CHANNEL kQTMR_Channel_0&lt;BR /&gt;#define QTMR_CounterInputPin kQTMR_Counter0InputPin&lt;/P&gt;&lt;P&gt;#define QTMR_IRQ_ID TMR1_IRQn&lt;BR /&gt;#define QTMR_IRQ_HANDLER TMR1_IRQHandler&lt;/P&gt;&lt;P&gt;volatile bool qtmrIsrFlag = false;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void QTMR_IRQ_HANDLER(void)&lt;BR /&gt;{&lt;BR /&gt;/* Clear interrupt flag.*/&lt;BR /&gt;QTMR_ClearStatusFlags(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_EdgeFlag);&lt;/P&gt;&lt;P&gt;qtmrIsrFlag = 1;&lt;BR /&gt;/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping&lt;BR /&gt;exception return operation might vector to incorrect interrupt */&lt;BR /&gt;__DSB();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;int main(void){&lt;/P&gt;&lt;P&gt;BOARD_ConfigMPU();&lt;BR /&gt;BOARD_InitBootPins();&lt;BR /&gt;BOARD_InitBootClocks();&lt;BR /&gt;BOARD_InitDebugConsole();&lt;/P&gt;&lt;P&gt;IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_XBAR1_IN21, 1U);&lt;BR /&gt;IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_09_XBAR1_IN21, 0x10B0U);&lt;/P&gt;&lt;P&gt;XBARA_Init(XBARA1);&lt;BR /&gt;XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputIomuxXbarIn21, kXBARA1_OutputQtimer1Tmr0Input);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;QTMR_GetDefaultConfig(&amp;amp;qtmrConfig);&lt;/P&gt;&lt;P&gt;/* Initial the input channel. */&lt;BR /&gt;qtmrConfig.primarySource = kQTMR_ClockDivide_16; //QTMR_PRIMARY_SOURCE;&lt;BR /&gt;QTMR_Init(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, &amp;amp;qtmrConfig);&lt;/P&gt;&lt;P&gt;/* Setup the input capture */&lt;BR /&gt;QTMR_SetupInputCapture(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, QTMR_CounterInputPin, false, true,&lt;BR /&gt;kQTMR_RisingEdge);&lt;/P&gt;&lt;P&gt;/* Enable at the NVIC */&lt;BR /&gt;EnableIRQ(QTMR_IRQ_ID);&lt;/P&gt;&lt;P&gt;/* Enable timer compare interrupt */&lt;BR /&gt;QTMR_EnableInterrupts(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_EdgeInterruptEnable);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Start the input channel to count on rising edge of the primary source clock */&lt;BR /&gt;QTMR_StartTimer(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_PriSrcRiseEdge);&lt;/P&gt;&lt;P&gt;while (1)&lt;BR /&gt;{&lt;BR /&gt;while (!qtmrIsrFlag)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;qtmrIsrFlag = 0;&lt;BR /&gt;PRINTF("\r\n****qtmr interrupt detected.****\n");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Cindy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 23:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1392757#M185125</guid>
      <dc:creator>Cindy</dc:creator>
      <dc:date>2021-12-28T23:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX.RT 1050 - XBAR and Quad timer input capture function - interrupt is not triggered</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1392884#M185144</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;After having a brief review of the code, I find you miss to configuring the QTIMER1_TRM0_INPUT_SEL in the IOMUXC_GPR_GPR6 register to enable QTIMER1 TMR0 from XBAR.&lt;BR /&gt;Please fix it and give it a try again.&lt;BR /&gt;Hope it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 06:04:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1392884#M185144</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-12-29T06:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX.RT 1050 - XBAR and Quad timer input capture function - interrupt is not triggered</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1393089#M185171</link>
      <description>&lt;P&gt;Dear jeremyzhou,&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;You have provided an accurate solution to my problem and&lt;/DIV&gt;&lt;DIV class=""&gt;allow me to make further progress. The problem has been fixed.&lt;/DIV&gt;&lt;DIV class=""&gt;I appreciate your prompt reply very much.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you!&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Yours Sincerely,&lt;/DIV&gt;&lt;DIV class=""&gt;Cindy&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Dec 2021 15:07:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX-RT-1050-XBAR-and-Quad-timer-input-capture-function/m-p/1393089#M185171</guid>
      <dc:creator>Cindy</dc:creator>
      <dc:date>2021-12-29T15:07:19Z</dc:date>
    </item>
  </channel>
</rss>

