<?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: LPC546xx: CT1_CAP0 on P2_0 doesn't work in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428101#M48210</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have checked your code, I think you have to add the line:&lt;/P&gt;
&lt;P&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;/P&gt;
&lt;P&gt;before you call the IOCON_PinMuxSet();&lt;/P&gt;
&lt;P&gt;If you had added the line in your code, I have no idea, I think your code is correct. If you still can not fire the capture interrupt with P2_0 pin, pls try to configure the P2_0 as GPIO output mode, then set/clear the P2_0 pin, check the pin 8 of J12 Analog In connector on EVB, check if the state of the pin changes.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 02:52:02 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2022-03-15T02:52:02Z</dc:date>
    <item>
      <title>LPC546xx: CT1_CAP0 on P2_0 doesn't work</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1427726#M48206</link>
      <description>&lt;P&gt;I want to use P2_0 as the capture input 0 for CTIMER1, so, starting from&amp;nbsp;lpcxpresso54628_hello_world SDK example for LPCXpresso EVB, I added the following code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#define CTIMER                                  CTIMER1
#define TIMER_RESOLUTION_ns                     100

#if 0
#define PIN_CAPTURE                             2, 0
#define CAPNUM                                  0
#define IOCON_PIO_FUNC4                         4
#elif 1
#define PIN_CAPTURE                             2, 17
#define CAPNUM                                  1
#define IOCON_PIO_FUNC4                         4
#endif



	CLOCK_AttachClk(kMAIN_CLK_to_ASYNC_APB);
    IOCON_PinMuxSet(IOCON, PIN_CAPTURE,
    		IOCON_PIO_FUNC4 |
            IOCON_PIO_MODE_INACT |		/* No addition pin function */
            IOCON_PIO_INV_DI |			/* Input function is not inverted */
            IOCON_PIO_DIGITAL_EN |		/* Enables digital function */
            IOCON_PIO_INPFILT_OFF |		/* Input filter disabled */
            IOCON_PIO_OPENDRAIN_DI);    /* Open drain is disabled */
    ctimer_config_t ctmr_cfg;
	ctmr_cfg.mode = kCTIMER_TimerMode;
	ctmr_cfg.prescale = (CLOCK_GetAsyncApbClkFreq() / 1000000) * TIMER_RESOLUTION_ns / 1000 - 1;
	CTIMER_Init(CTIMER, &amp;amp;ctmr_cfg);

	CTIMER_SetupCapture(CTIMER,
			kCTIMER_Capture_0 + CAPNUM,
			kCTIMER_Capture_BothEdge,
			true);		/* Enable interrupt */
    NVIC_EnableIRQ(CTIMER1_IRQn);
	CTIMER_StartTimer(CTIMER);



void
CTIMER1_IRQHandler(void)
{
	CTIMER_ClearStatusFlags(CTIMER,
			CTIMER_IR_CR0INT_MASK &amp;lt;&amp;lt; CAPNUM);
}&lt;/LI-CODE&gt;&lt;P&gt;P2_0 is on pin 8 of J12 Analog In connector on EVB. When I connect alternatively this pin to GND and VCC, no interrupt is fired.&lt;/P&gt;&lt;P&gt;When I try to use P2_17 as CT1_CAP1 (pin 20 of J13 Digital connector) it works, the interrupt is triggered.&lt;/P&gt;&lt;P&gt;What's wrong with P2_0? It's a type A pin, but it seems it can be used as CT1_CAP0.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 12:05:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1427726#M48206</guid>
      <dc:creator>giusloq</dc:creator>
      <dc:date>2022-03-14T12:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx: CT1_CAP0 on P2_0 doesn't work</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428101#M48210</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have checked your code, I think you have to add the line:&lt;/P&gt;
&lt;P&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;/P&gt;
&lt;P&gt;before you call the IOCON_PinMuxSet();&lt;/P&gt;
&lt;P&gt;If you had added the line in your code, I have no idea, I think your code is correct. If you still can not fire the capture interrupt with P2_0 pin, pls try to configure the P2_0 as GPIO output mode, then set/clear the P2_0 pin, check the pin 8 of J12 Analog In connector on EVB, check if the state of the pin changes.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 02:52:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428101#M48210</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-15T02:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx: CT1_CAP0 on P2_0 doesn't work</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428366#M48221</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;I have checked your code, I think you have to add the line:&lt;/P&gt;&lt;P&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;/P&gt;&lt;P&gt;before you call the IOCON_PinMuxSet();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes I have that code.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;pls try to configure the P2_0 as GPIO output mode, then set/clear the P2_0 pin, check the pin 8 of J12 Analog In connector on EVB, check if the state of the pin changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I already made this test and it works.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 09:21:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428366#M48221</guid>
      <dc:creator>giusloq</dc:creator>
      <dc:date>2022-03-15T09:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx: CT1_CAP0 on P2_0 doesn't work</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428406#M48224</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In the case, I have no idea, You have to use debugger to check the CTimer1 registers and the PIO2_0 register.&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, 15 Mar 2022 10:06:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1428406#M48224</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-15T10:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx: CT1_CAP0 on P2_0 doesn't work</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1429179#M48243</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;In the case, I have no idea, You have to use debugger to check the CTimer1 registers and the PIO2_0 register.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Yes, I checked in Peripherals window of MCUXpresso and all the registers seem configured well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Have you the possibility to check with one of your LPCXpresso54628 EVB and test a sample project to share with me? Many thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 09:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546xx-CT1-CAP0-on-P2-0-doesn-t-work/m-p/1429179#M48243</guid>
      <dc:creator>giusloq</dc:creator>
      <dc:date>2022-03-16T09:48:00Z</dc:date>
    </item>
  </channel>
</rss>

