<?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>LPC Microcontrollers中的主题 Re: The SCT cannot get the input event</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182886#M42871</link>
    <description>&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think I've found the problem!&amp;nbsp;It is OK now.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;INPUTMUX_Init(INPUTMUX) should be executed before the INPUTMUX setting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CLOCK_EnableClock(kCLOCK_Sct);&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Dma);&lt;/P&gt;&lt;P&gt;In this function: The inputmux clock of sct&amp;nbsp; is enabled.&lt;/P&gt;&lt;P&gt;The SCT INMUX clock is drived by xxx? CLOCK_SCT or CLOCK_SWM ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2020 06:57:24 GMT</pubDate>
    <dc:creator>Tony2k20</dc:creator>
    <dc:date>2020-11-13T06:57:24Z</dc:date>
    <item>
      <title>The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1181950#M42844</link>
      <description>&lt;P&gt;I purchased a development board(845MAX) to evaluate the SCT module&lt;BR /&gt;1. Output a 100KHz signal from CLKOUT to P0_21 (which can be measured by the oscilloscope)&lt;BR /&gt;2. Route P0_20 as SCT_PIN0 and route to SCT_INMUX 0&lt;BR /&gt;3. Short-circuit P0.20 and P0.21&lt;BR /&gt;4. Set SCT_OUT0 as the test output 0 (The output waveform can be measured using an oscilloscope by simply matching two values)&lt;BR /&gt;5. Set SCT_OUT1 as the test output 1 (set 0 to capture the falling edge of IN0 and set 1 to capture the rising edge of IN0)&lt;BR /&gt;(the oscilloscope cannot get any waveform , it is OK after the event was changed to match)&lt;BR /&gt;6. SCT_IN0 as a clock doesn't work (either in sampling or asynchronous mode), and SCT doesn't work at all when set( When I use async mode, the debug probe cannot detect the target chip, I erase the flash via ISP and set others clock mode, the IDE can work normally)&lt;/P&gt;&lt;P&gt;I have read the AN11538,&amp;nbsp; INSYNC should be set to 1, so I do.&lt;/P&gt;&lt;P&gt;Plz help me!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const sctimer_config_t SCT0_initConfig = {&lt;BR /&gt;.enableCounterUnify = true,&lt;BR /&gt;.clockMode = kSCTIMER_System_ClockMode,&lt;BR /&gt;.clockSelect = kSCTIMER_Clock_On_Rise_Input_0,&lt;BR /&gt;.enableBidirection_l = false,&lt;BR /&gt;.enableBidirection_h = false,&lt;BR /&gt;.prescale_l = 0U,&lt;BR /&gt;.prescale_h = 0U,&lt;BR /&gt;.outInitState = (uint8_t)(0),&lt;BR /&gt;.inputsync = (1 &amp;lt;&amp;lt; 0U)|&lt;BR /&gt;};&lt;BR /&gt;uint32_t SCT0_event[5];&lt;/P&gt;&lt;P&gt;static void SCT0_init(void)&lt;BR /&gt;{&lt;BR /&gt;SCTIMER_Init(SCT0, &amp;amp;SCT0_initConfig);&lt;BR /&gt;/* Initialization of state 0 */&lt;BR /&gt;SCTIMER_CreateAndScheduleEvent(SCT0, kSCTIMER_MatchEventOnly, 1, kSCTIMER_Out_0, kSCTIMER_Counter_U, &amp;amp;SCT0_event[0]);&lt;BR /&gt;SCTIMER_SetupOutputClearAction(SCT0, kSCTIMER_Out_0, SCT0_event[0]);&lt;/P&gt;&lt;P&gt;SCTIMER_CreateAndScheduleEvent(SCT0, kSCTIMER_MatchEventOnly, 6, kSCTIMER_Out_0, kSCTIMER_Counter_U, &amp;amp;SCT0_event[1]);&lt;BR /&gt;SCTIMER_SetupOutputSetAction(SCT0, kSCTIMER_Out_0, SCT0_event[1]);&lt;/P&gt;&lt;P&gt;SCTIMER_CreateAndScheduleEvent(SCT0, kSCTIMER_MatchEventOnly, 16, kSCTIMER_Out_0, kSCTIMER_Counter_U, &amp;amp;SCT0_event[2]);&lt;BR /&gt;SCTIMER_SetupCounterLimitAction(SCT0, kSCTIMER_Counter_U, SCT0_event[2]);&lt;/P&gt;&lt;P&gt;SCTIMER_CreateAndScheduleEvent(SCT0, kSCTIMER_InputFallEvent, 0, kSCTIMER_Input_1, kSCTIMER_Counter_U, &amp;amp;SCT0_event[3]);&lt;BR /&gt;SCTIMER_SetupOutputClearAction(SCT0, kSCTIMER_Out_1, SCT0_event[3]);&lt;/P&gt;&lt;P&gt;SCTIMER_CreateAndScheduleEvent(SCT0, kSCTIMER_InputRiseEvent, 0, kSCTIMER_Input_1, kSCTIMER_Counter_U, &amp;amp;SCT0_event[4]);&lt;BR /&gt;SCTIMER_SetupOutputSetAction(SCT0, kSCTIMER_Out_1, SCT0_event[4]);&lt;/P&gt;&lt;P&gt;SCTIMER_StartTimer(SCT0, kSCTIMER_Counter_U);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void BOARD_InitPins(void)&lt;BR /&gt;{&lt;BR /&gt;/* Enables clock for IOCON.: enable */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;BR /&gt;/* Enables clock for switch matrix.: enable */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;BR /&gt;/* SCT_PIN0. Assign to pin using the switch matrix 0 */&lt;BR /&gt;INPUTMUX_AttachSignal(INPUTMUX, 0U, kINPUTMUX_SctPin0ToSct0);&lt;/P&gt;&lt;P&gt;const uint32_t DEBUG_UART_RX = (/* Selects pull-up function */&lt;BR /&gt;IOCON_PIO_MODE_PULLUP |&lt;BR /&gt;/* Enable hysteresis */&lt;BR /&gt;IOCON_PIO_HYS_EN |&lt;BR /&gt;/* Input not invert */&lt;BR /&gt;IOCON_PIO_INV_DI |&lt;BR /&gt;/* Disables Open-drain function */&lt;BR /&gt;IOCON_PIO_OD_DI |&lt;BR /&gt;/* Bypass input filter */&lt;BR /&gt;IOCON_PIO_SMODE_BYPASS |&lt;BR /&gt;/* IOCONCLKDIV0 */&lt;BR /&gt;IOCON_PIO_CLKDIV0);&lt;BR /&gt;/* PIO1 PIN16 (coords: 36) is configured as USART0, RXD. */&lt;BR /&gt;IOCON_PinMuxSet(IOCON, IOCON_INDEX_PIO1_16, DEBUG_UART_RX);&lt;/P&gt;&lt;P&gt;const uint32_t DEBUG_UART_TX = (/* Selects pull-up function */&lt;BR /&gt;IOCON_PIO_MODE_PULLUP |&lt;BR /&gt;/* Enable hysteresis */&lt;BR /&gt;IOCON_PIO_HYS_EN |&lt;BR /&gt;/* Input not invert */&lt;BR /&gt;IOCON_PIO_INV_DI |&lt;BR /&gt;/* Disables Open-drain function */&lt;BR /&gt;IOCON_PIO_OD_DI |&lt;BR /&gt;/* Bypass input filter */&lt;BR /&gt;IOCON_PIO_SMODE_BYPASS |&lt;BR /&gt;/* IOCONCLKDIV0 */&lt;BR /&gt;IOCON_PIO_CLKDIV0);&lt;BR /&gt;/* PIO1 PIN17 (coords: 37) is configured as USART0, TXD. */&lt;BR /&gt;IOCON_PinMuxSet(IOCON, IOCON_INDEX_PIO1_17, DEBUG_UART_TX);&lt;/P&gt;&lt;P&gt;/* USART0_TXD connect to P1_17 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P1_17);&lt;/P&gt;&lt;P&gt;/* USART0_RXD connect to P1_16 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P1_16);&lt;/P&gt;&lt;P&gt;/* CLKOUT connect to P0_21 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_CLKOUT, kSWM_PortPin_P0_21);&lt;/P&gt;&lt;P&gt;/* SCT_PIN0 connect to P0_20 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_SCT_PIN0, kSWM_PortPin_P0_20);&lt;/P&gt;&lt;P&gt;/* SCT_OUT0 connect to P1_21 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_SCT_OUT0, kSWM_PortPin_P1_21);&lt;/P&gt;&lt;P&gt;/* SCT_OUT1 connect to P1_20 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_SCT_OUT1, kSWM_PortPin_P1_20);&lt;/P&gt;&lt;P&gt;/* Disable clock for switch matrix. */&lt;BR /&gt;CLOCK_DisableClock(kCLOCK_Swm);&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;</description>
      <pubDate>Thu, 12 Nov 2020 03:41:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1181950#M42844</guid>
      <dc:creator>Tony2k20</dc:creator>
      <dc:date>2020-11-12T03:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182089#M42848</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;5. Set SCT_OUT1 as the test output 1 (set 0 to capture the falling edge of IN0 and set 1 to capture the rising edge of IN0)(the oscilloscope cannot get any waveform&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;It seems you use config tool to generate code, so how about create a new project, that just test this function, give a signal to IN0 not from SCT, for example just a high to low to high, check whether the SCT_OUT1 can work well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 07:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182089#M42848</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-12T07:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182108#M42850</link>
      <description>&lt;P&gt;I have set SCT_IN4( SCT_CLK&amp;nbsp; == 200kHz ) as the SCT input, the input event can work normally.&lt;/P&gt;&lt;P&gt;The problem may lie in the input Settings for the SCT.&lt;/P&gt;&lt;P&gt;Could you show me an example of SCT input Settings?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 08:01:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182108#M42850</guid>
      <dc:creator>Tony2k20</dc:creator>
      <dc:date>2020-11-12T08:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182159#M42852</link>
      <description>&lt;P class="src grammarSection"&gt;The pin configuration is as follows&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tony2k20_0-1605171536169.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129795iCE0EC202BFDAC8E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tony2k20_0-1605171536169.png" alt="Tony2k20_0-1605171536169.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If there is any problem, could you please point it out&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 09:02:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182159#M42852</guid>
      <dc:creator>Tony2k20</dc:creator>
      <dc:date>2020-11-12T09:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182843#M42868</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can share your&amp;nbsp; project, I help to check my side, thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 06:22:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182843#M42868</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-13T06:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182886#M42871</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think I've found the problem!&amp;nbsp;It is OK now.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;INPUTMUX_Init(INPUTMUX) should be executed before the INPUTMUX setting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CLOCK_EnableClock(kCLOCK_Sct);&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Dma);&lt;/P&gt;&lt;P&gt;In this function: The inputmux clock of sct&amp;nbsp; is enabled.&lt;/P&gt;&lt;P&gt;The SCT INMUX clock is drived by xxx? CLOCK_SCT or CLOCK_SWM ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 06:57:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1182886#M42871</guid>
      <dc:creator>Tony2k20</dc:creator>
      <dc:date>2020-11-13T06:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: The SCT cannot get the input event</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1184308#M42903</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;
&lt;P&gt;I think is CLOCK_SCT,&amp;nbsp; there is no mentioned clearly, while need enable SCT clock then can&lt;/P&gt;
&lt;P&gt;control&amp;nbsp; the INPUTMUX register.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 07:35:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/The-SCT-cannot-get-the-input-event/m-p/1184308#M42903</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-17T07:35:12Z</dc:date>
    </item>
  </channel>
</rss>

