<?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 LPC4367 SCT input Event Interrupt issue in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1184909#M42908</link>
    <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;I am working LPC4367 MCU SCT timer to read the IR Remote data.I have created init function as per AN11538 RC5 example and changed input pin to CTIN_6.&lt;/P&gt;&lt;P&gt;void PwmInit(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;Chip_SCU_PinMuxSet(0x2, 2, (SCU_MODE_PULLDOWN | SCU_MODE_FUNC5));&lt;BR /&gt;Chip_SCTPWM_Init(SCT_PWM);&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;CTRL_L |= (SystemCoreClock/1000000-1) &amp;lt;&amp;lt; 5; // set prescaler, SCTimer/PWM clock = 1 MHz&lt;BR /&gt;SCT_PWM-&amp;gt;REGMODE_L = (1 &amp;lt;&amp;lt; 1) | (1 &amp;lt;&amp;lt; 2); // register pair 1 and 2 are capture&lt;BR /&gt;SCT_PWM-&amp;gt;MATCH[0].L = 12000; // match 0 @ 12000/1MHz = 12 msec (timeout)&lt;BR /&gt;SCT_PWM-&amp;gt;MATCHREL[0].L = 12000;&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[0].STATE = 0x00000001; // event 0 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[0].CTRL = (0 &amp;lt;&amp;lt; 0) | // MATCHSEL[3:0] = related to match 0&lt;BR /&gt;(1 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses match condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[1].STATE = 0x00000001; // event 1 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[1].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(2 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = falling edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV[ 15] = new state is 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[2].STATE = 0x00000001; // event 2 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[2].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(1 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = rising edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;CAPCTRL[1].L = (1 &amp;lt;&amp;lt; 1); // event 1 causes capture 1 to be loaded&lt;BR /&gt;SCT_PWM-&amp;gt;CAPCTRL[2].L = (1 &amp;lt;&amp;lt; 2); // event 2 causes capture 2 to be loaded&lt;BR /&gt;SCT_PWM-&amp;gt;LIMIT_L = 0x0007; // events 0, 1 and 2 are used as counter limit&lt;BR /&gt;SCT_PWM-&amp;gt;EVEN = 0x00000005; // events 0 and 2 generate interrupts&lt;BR /&gt;NVIC_EnableIRQ(SCT_IRQn); // enable SCTimer/PWM interrupt&lt;BR /&gt;Chip_SCTPWM_Start(SCT_PWM);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void SCT_IRQHandler(void) {&lt;/P&gt;&lt;P&gt;if(SCT_PWM-&amp;gt;EVFLAG &amp;amp; SCT_EVT_0) {&lt;/P&gt;&lt;P&gt;timeout = 1;&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;EVFLAG = SCT_EVT_0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if(SCT_PWM-&amp;gt;EVFLAG &amp;amp; SCT_EVT_2) {&lt;BR /&gt;// If we have a wraparound on the counter between the rising and falling edge detection, correct the value&lt;BR /&gt;if (SCT_PWM-&amp;gt;CAP[2].U &amp;lt; SCT_PWM-&amp;gt;CAP[1].U)&lt;BR /&gt;capture[CaptureIndex++]=0xFFFFFFFF + SCT_PWM-&amp;gt;CAP[2].U - SCT_PWM-&amp;gt;CAP[1].U;&lt;BR /&gt;else&lt;BR /&gt;capture[CaptureIndex++] = SCT_PWM-&amp;gt;CAP[2].U- SCT_PWM-&amp;gt;CAP[1].U;&lt;BR /&gt;// Set timeout for change detected&lt;/P&gt;&lt;P&gt;if(CaptureIndex == 31){&lt;BR /&gt;CaptureIndex = 0;&lt;BR /&gt;RemoteFlag = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;EVFLAG = SCT_EVT_2;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I am getting only event0 interrupt every 20ms. but there there is no interrupt generating from event2.&lt;/P&gt;&lt;P&gt;Capturing the pulse width in the event 2 and loading into array.&lt;/P&gt;&lt;P&gt;Please help us resloving this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chethan Kumar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 05:09:16 GMT</pubDate>
    <dc:creator>chethan_k</dc:creator>
    <dc:date>2020-11-18T05:09:16Z</dc:date>
    <item>
      <title>LPC4367 SCT input Event Interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1184909#M42908</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;I am working LPC4367 MCU SCT timer to read the IR Remote data.I have created init function as per AN11538 RC5 example and changed input pin to CTIN_6.&lt;/P&gt;&lt;P&gt;void PwmInit(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;Chip_SCU_PinMuxSet(0x2, 2, (SCU_MODE_PULLDOWN | SCU_MODE_FUNC5));&lt;BR /&gt;Chip_SCTPWM_Init(SCT_PWM);&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;CTRL_L |= (SystemCoreClock/1000000-1) &amp;lt;&amp;lt; 5; // set prescaler, SCTimer/PWM clock = 1 MHz&lt;BR /&gt;SCT_PWM-&amp;gt;REGMODE_L = (1 &amp;lt;&amp;lt; 1) | (1 &amp;lt;&amp;lt; 2); // register pair 1 and 2 are capture&lt;BR /&gt;SCT_PWM-&amp;gt;MATCH[0].L = 12000; // match 0 @ 12000/1MHz = 12 msec (timeout)&lt;BR /&gt;SCT_PWM-&amp;gt;MATCHREL[0].L = 12000;&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[0].STATE = 0x00000001; // event 0 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[0].CTRL = (0 &amp;lt;&amp;lt; 0) | // MATCHSEL[3:0] = related to match 0&lt;BR /&gt;(1 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses match condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[1].STATE = 0x00000001; // event 1 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[1].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(2 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = falling edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV[ 15] = new state is 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[2].STATE = 0x00000001; // event 2 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[2].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(1 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = rising edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;CAPCTRL[1].L = (1 &amp;lt;&amp;lt; 1); // event 1 causes capture 1 to be loaded&lt;BR /&gt;SCT_PWM-&amp;gt;CAPCTRL[2].L = (1 &amp;lt;&amp;lt; 2); // event 2 causes capture 2 to be loaded&lt;BR /&gt;SCT_PWM-&amp;gt;LIMIT_L = 0x0007; // events 0, 1 and 2 are used as counter limit&lt;BR /&gt;SCT_PWM-&amp;gt;EVEN = 0x00000005; // events 0 and 2 generate interrupts&lt;BR /&gt;NVIC_EnableIRQ(SCT_IRQn); // enable SCTimer/PWM interrupt&lt;BR /&gt;Chip_SCTPWM_Start(SCT_PWM);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void SCT_IRQHandler(void) {&lt;/P&gt;&lt;P&gt;if(SCT_PWM-&amp;gt;EVFLAG &amp;amp; SCT_EVT_0) {&lt;/P&gt;&lt;P&gt;timeout = 1;&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;EVFLAG = SCT_EVT_0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if(SCT_PWM-&amp;gt;EVFLAG &amp;amp; SCT_EVT_2) {&lt;BR /&gt;// If we have a wraparound on the counter between the rising and falling edge detection, correct the value&lt;BR /&gt;if (SCT_PWM-&amp;gt;CAP[2].U &amp;lt; SCT_PWM-&amp;gt;CAP[1].U)&lt;BR /&gt;capture[CaptureIndex++]=0xFFFFFFFF + SCT_PWM-&amp;gt;CAP[2].U - SCT_PWM-&amp;gt;CAP[1].U;&lt;BR /&gt;else&lt;BR /&gt;capture[CaptureIndex++] = SCT_PWM-&amp;gt;CAP[2].U- SCT_PWM-&amp;gt;CAP[1].U;&lt;BR /&gt;// Set timeout for change detected&lt;/P&gt;&lt;P&gt;if(CaptureIndex == 31){&lt;BR /&gt;CaptureIndex = 0;&lt;BR /&gt;RemoteFlag = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;EVFLAG = SCT_EVT_2;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I am getting only event0 interrupt every 20ms. but there there is no interrupt generating from event2.&lt;/P&gt;&lt;P&gt;Capturing the pulse width in the event 2 and loading into array.&lt;/P&gt;&lt;P&gt;Please help us resloving this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chethan Kumar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 05:09:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1184909#M42908</guid>
      <dc:creator>chethan_k</dc:creator>
      <dc:date>2020-11-18T05:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4367 SCT input Event Interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1186542#M42956</link>
      <description>&lt;P&gt;Hi, Chethan,&lt;/P&gt;
&lt;P&gt;I think your SCT code is correct, but I do not see you initialize the SCT CTIN_6 capture input multiplexer, if you set the EDGE bit in the SCT CTIN_6 capture input multiplexer, what is the result?&lt;/P&gt;
&lt;P&gt;Pls refer to the section 18.4.23 SCT CTIN_6 capture input multiplexer (CTIN_6_IN) in the UM10503.pdf.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 08:08:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1186542#M42956</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-20T08:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4367 SCT input Event Interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1189584#M43053</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun Rong,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have added GIMA CTIN in the intialization but in the document it is showing for CTIN_6 GIMA output is 22, i don't know where i need to initialize this value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Still i am not getting the interrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please help us?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have any example code for the same?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chip_SCU_PinMuxSet(0x2, 2, (SCU_MODE_PULLDOWN | SCU_MODE_FUNC5));&lt;BR /&gt;Chip_SCTPWM_Init(SCT_PWM);&lt;/SPAN&gt;SCT_PWM-&amp;gt;CTRL_L |= (SystemCoreClock/1000000-1) &amp;lt;&amp;lt; 5; // set prescaler, SCTimer/PWM clock = 1 MHz&lt;BR /&gt;LPC_GIMA-&amp;gt;CTIN_IN[6] = (0 &amp;lt;&amp;lt; 0) | // GIMA input mux CTIN6 selected as non inverted&lt;BR /&gt;(1 &amp;lt;&amp;lt; 1) | // GIMA input mux CTIN6 selected as rising edge&lt;BR /&gt;(1 &amp;lt;&amp;lt; 2) | // Synchronization is enabled&lt;BR /&gt;(0 &amp;lt;&amp;lt; 3) | // Disable pulse generation.&lt;BR /&gt;(0 &amp;lt;&amp;lt; 4); // Selected CTIN_6 as input&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;REGMODE_L = (1 &amp;lt;&amp;lt; 1) | (1 &amp;lt;&amp;lt; 2); // register pair 1 and 2 are capture&lt;BR /&gt;SCT_PWM-&amp;gt;MATCH[0].L = 12000; // match 0 @ 12000/1MHz = 12 msec (timeout)&lt;BR /&gt;SCT_PWM-&amp;gt;MATCHREL[0].L = 12000;&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[0].STATE = 0x00000001; // event 0 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[0].CTRL = (0 &amp;lt;&amp;lt; 0) | // MATCHSEL[3:0] = related to match 0&lt;BR /&gt;(1 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses match condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[1].STATE = 0x00000001; // event 1 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[1].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(2 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = falling edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV[ 15] = new state is 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[2].STATE = 0x00000001; // event 2 only happens in state 0&lt;BR /&gt;SCT_PWM-&amp;gt;EVENT[2].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(1 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = rising edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;/P&gt;&lt;P&gt;SCT_PWM-&amp;gt;CAPCTRL[1].L = (1 &amp;lt;&amp;lt; 1); // event 1 causes capture 1 to be loaded&lt;BR /&gt;SCT_PWM-&amp;gt;CAPCTRL[2].L = (1 &amp;lt;&amp;lt; 2); // event 2 causes capture 2 to be loaded&lt;BR /&gt;SCT_PWM-&amp;gt;LIMIT_L = 0x0007; // events 0, 1 and 2 are used as counter limit&lt;BR /&gt;SCT_PWM-&amp;gt;EVEN = 0x00000005; // events 0 and 2 generate interrupts&lt;BR /&gt;NVIC_EnableIRQ(SCT_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chethan Kumar&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 08:56:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1189584#M43053</guid>
      <dc:creator>chethan_k</dc:creator>
      <dc:date>2020-11-26T08:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4367 SCT input Event Interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1195248#M43176</link>
      <description>&lt;P&gt;Hi, Kumar,&lt;/P&gt;
&lt;P&gt;I am sorry for the delay.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;because you do not use the state mechanism, how about setting all the state register you have used as 0xFFFF and have a try?&lt;/P&gt;
&lt;P&gt;SCT_PWM-&amp;gt;EVENT[2].STATE = oxFFFF; // event 2 only happens in state 0&lt;/P&gt;
&lt;P&gt;BTW,pls refer to the ticket:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/Capture-problem-with-SCT-on-LPC824/m-p/646482#M25573" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers/Capture-problem-with-SCT-on-LPC824/m-p/646482#M25573&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 07:37:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1195248#M43176</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-12-08T07:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4367 SCT input Event Interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1195419#M43180</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun Rong,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have changed state also, there&amp;nbsp;is no changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please see attached file for your reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try once ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chethan Kumar&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 10:11:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1195419#M43180</guid>
      <dc:creator>chethan_k</dc:creator>
      <dc:date>2020-12-08T10:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4367 SCT input Event Interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1198789#M43250</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Because I have not LPC4367 board, I develop code based on your original code, it works fine on my LPC55S69 board.&lt;/P&gt;
&lt;P&gt;I copy the code, pls modify your code.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;void PwmInit(void)&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;//set PIO0_5 as SCT trigger signal&lt;BR /&gt;//set PIO0_5 as P0_5/FC4_RXD_SDA_MOSI/CT3MAT0/SCT_GPI5(Func 4)&lt;BR /&gt;//enable IOCON bit&lt;BR /&gt;SYSCON-&amp;gt;AHBCLKCTRLX[0]|=1&amp;lt;&amp;lt;13;&lt;BR /&gt;IOCON-&amp;gt;PIO[0][5]=0x104;&lt;/P&gt;
&lt;P&gt;//enable gated clock for MUX&lt;BR /&gt;//P0_5(SCT_GPI5) is routed to SCT0_INPUT3 signal&lt;BR /&gt;SYSCON-&amp;gt;AHBCLKCTRLX[0]|=1&amp;lt;&amp;lt;11;&lt;BR /&gt;INPUTMUX-&amp;gt;SCT0_INMUX[3]=5;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;//enable SCT0 gated clock&lt;BR /&gt;SYSCON-&amp;gt;AHBCLKCTRLX[1]|=1&amp;lt;&amp;lt;2;&lt;/P&gt;
&lt;P&gt;SCT0-&amp;gt;CTRL |= (SystemCoreClock/1000000-1) &amp;lt;&amp;lt; 5; // set prescaler, SCTimer/PWM clock = 1 MHz&lt;BR /&gt;SCT0-&amp;gt;CONFIG|=1&amp;lt;&amp;lt;0|1&amp;lt;&amp;lt;17;&lt;BR /&gt;SCT0-&amp;gt;REGMODE = (1 &amp;lt;&amp;lt;2); // register pair 1 and 2 are capture&lt;BR /&gt;SCT0-&amp;gt;MATCH[0]= 12000; // match 0 @ 12000/1MHz = 12 msec (timeout)&lt;BR /&gt;SCT0-&amp;gt;MATCHREL[0] = 12000;&lt;BR /&gt;SCT0-&amp;gt;EV[0].STATE = 0xFFFF; // event 0 only happens in state 0&lt;BR /&gt;SCT0-&amp;gt;EV[0].CTRL = (0 &amp;lt;&amp;lt; 0) | // MATCHSEL[3:0] = related to match 0&lt;BR /&gt;(1 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses match condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;BR /&gt;SCT0-&amp;gt;EV[1].STATE = 0xFFFF; // event 1 only happens in state 0&lt;BR /&gt;SCT0-&amp;gt;EV[1].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(3 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN3&lt;BR /&gt;(2 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = falling edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV[ 15] = new state is 0&lt;BR /&gt;#if 0&lt;BR /&gt;SCT0-&amp;gt;EV[2].STATE = 0xFFFF; // event 2 only happens in state 0&lt;BR /&gt;SCT0-&amp;gt;EV[2].CTRL = (0 &amp;lt;&amp;lt; 5) |&lt;BR /&gt;(6 &amp;lt;&amp;lt; 6) | // IOSEL [9:6] = SCT_IN6&lt;BR /&gt;(1 &amp;lt;&amp;lt; 10) | // IOCOND [11:10] = rising edge&lt;BR /&gt;(2 &amp;lt;&amp;lt; 12) | // COMBMODE[13:12] = uses IO condition only&lt;BR /&gt;(1 &amp;lt;&amp;lt; 14) | // STATELD [14] = STATEV is loaded into state&lt;BR /&gt;(0 &amp;lt;&amp;lt; 15); // STATEV [15] = new state is 0&lt;BR /&gt;#endif&lt;BR /&gt;SCT0-&amp;gt;CAPCTRL[2] = (1 &amp;lt;&amp;lt; 1); // event 1 causes capture 0 to be loaded&lt;BR /&gt;//SCT0-&amp;gt;CAPCTRL[2] = (1 &amp;lt;&amp;lt; 2); // event 2 causes capture 2 to be loaded&lt;BR /&gt;SCT0-&amp;gt;LIMIT=0x00;&lt;BR /&gt;//SCT0-&amp;gt;LIMIT = 0x0007; // events 0, 1 and 2 are used as counter limit&lt;BR /&gt;SCT0-&amp;gt;EVEN = 0x02; // events 0 and 2 generate interrupts&lt;BR /&gt;//NVIC_EnableIRQ(SCT_IRQn); // enable SCTimer/PWM interrupt&lt;BR /&gt;//Chip_SCTPWM_Start(SCT_PWM);&lt;BR /&gt;//SCT0 interrupt vector is 12&lt;/P&gt;
&lt;P&gt;NVIC-&amp;gt;ISER[0]|=1&amp;lt;&amp;lt;12;&lt;BR /&gt;NVIC-&amp;gt;ICPR[0]|=1&amp;lt;&amp;lt;12;&lt;BR /&gt;NVIC-&amp;gt;IPR[12]=0x00;&lt;BR /&gt;//start SCT0&lt;BR /&gt;SCT0-&amp;gt;CTRL&amp;amp;=~(1&amp;lt;&amp;lt;2);&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt;uint32_t capture_Value;&lt;BR /&gt;void SCT0_DriverIRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;if(SCT0-&amp;gt;EVFLAG&amp;amp;0x02)&lt;BR /&gt;{&lt;BR /&gt;SCT0-&amp;gt;EVFLAG|=0x02;&lt;BR /&gt;//toggle LED0&lt;BR /&gt;capture_Value=SCT0-&amp;gt;CAP[2];&lt;BR /&gt;//GPIO_PortToggle(GPIO, BOARD_LED_PORT, 1u &amp;lt;&amp;lt; BOARD_LED_PIN);&lt;BR /&gt;GPIO-&amp;gt;NOT[1]=1&amp;lt;&amp;lt;4;&lt;BR /&gt;__asm("nop");&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 09:31:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4367-SCT-input-Event-Interrupt-issue/m-p/1198789#M43250</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-12-14T09:31:37Z</dc:date>
    </item>
  </channel>
</rss>

