<?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 SCTimer unified counter problem in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCTimer-unified-counter-problem/m-p/1430786#M48268</link>
    <description>&lt;P&gt;Hello, my thesis work is based on LPC845 breakout board, i'm trying to generate a square signal on event match of the counter, because i need to understand well SCTimer, for more complex application later on my thesis.&lt;/P&gt;&lt;P&gt;I generated the code with config tool.&lt;/P&gt;&lt;P&gt;For the final application, my supervisor want to use a SCTimer with unified 32bit counter (as the reference paper), my problem is that the SCTimer goes well with configuration of two 16 bit counters, but when i switch to unified 32 bit counter, no output is produced.&lt;/P&gt;&lt;P&gt;I read the SCTimer cookbook, datasheet but i don't find anything that could help me to make it work.&lt;/P&gt;&lt;P&gt;Here the generated code:&lt;/P&gt;&lt;P&gt;const sctimer_config_t SCT0_initConfig =&lt;/P&gt;&lt;P&gt;{&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 = 99U,&lt;BR /&gt;.prescale_h = 0U,&lt;BR /&gt;.outInitState = 0U,&lt;BR /&gt;.inputsync = 0U&lt;BR /&gt;};&lt;BR /&gt;uint32_t SCT0_event[1];&lt;/P&gt;&lt;P&gt;static void SCT0_init(void)&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;SCTIMER_Init(SCT0_PERIPHERAL, &amp;amp;SCT0_initConfig);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Initialization of state 0 */&lt;BR /&gt;SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_MatchEventOnly, 100, kSCTIMER_Out_0, kSCTIMER_Counter_L, &amp;amp;SCT0_event[0]);&lt;BR /&gt;SCTIMER_SetupOutputToggleAction(SCT0_PERIPHERAL, kSCTIMER_Out_0, SCT0_event[0]);&lt;BR /&gt;SCTIMER_SetupCounterLimitAction(SCT0_PERIPHERAL, kSCTIMER_Counter_L, SCT0_event[0]);&lt;BR /&gt;SCTIMER_StartTimer(SCT0_PERIPHERAL, kSCTIMER_Counter_L);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Anyone who spot the errors or can just give me some hints to make it work properly? Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2022 16:26:27 GMT</pubDate>
    <dc:creator>Deltadragon92</dc:creator>
    <dc:date>2022-03-18T16:26:27Z</dc:date>
    <item>
      <title>SCTimer unified counter problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCTimer-unified-counter-problem/m-p/1430786#M48268</link>
      <description>&lt;P&gt;Hello, my thesis work is based on LPC845 breakout board, i'm trying to generate a square signal on event match of the counter, because i need to understand well SCTimer, for more complex application later on my thesis.&lt;/P&gt;&lt;P&gt;I generated the code with config tool.&lt;/P&gt;&lt;P&gt;For the final application, my supervisor want to use a SCTimer with unified 32bit counter (as the reference paper), my problem is that the SCTimer goes well with configuration of two 16 bit counters, but when i switch to unified 32 bit counter, no output is produced.&lt;/P&gt;&lt;P&gt;I read the SCTimer cookbook, datasheet but i don't find anything that could help me to make it work.&lt;/P&gt;&lt;P&gt;Here the generated code:&lt;/P&gt;&lt;P&gt;const sctimer_config_t SCT0_initConfig =&lt;/P&gt;&lt;P&gt;{&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 = 99U,&lt;BR /&gt;.prescale_h = 0U,&lt;BR /&gt;.outInitState = 0U,&lt;BR /&gt;.inputsync = 0U&lt;BR /&gt;};&lt;BR /&gt;uint32_t SCT0_event[1];&lt;/P&gt;&lt;P&gt;static void SCT0_init(void)&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;SCTIMER_Init(SCT0_PERIPHERAL, &amp;amp;SCT0_initConfig);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Initialization of state 0 */&lt;BR /&gt;SCTIMER_CreateAndScheduleEvent(SCT0_PERIPHERAL, kSCTIMER_MatchEventOnly, 100, kSCTIMER_Out_0, kSCTIMER_Counter_L, &amp;amp;SCT0_event[0]);&lt;BR /&gt;SCTIMER_SetupOutputToggleAction(SCT0_PERIPHERAL, kSCTIMER_Out_0, SCT0_event[0]);&lt;BR /&gt;SCTIMER_SetupCounterLimitAction(SCT0_PERIPHERAL, kSCTIMER_Counter_L, SCT0_event[0]);&lt;BR /&gt;SCTIMER_StartTimer(SCT0_PERIPHERAL, kSCTIMER_Counter_L);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Anyone who spot the errors or can just give me some hints to make it work properly? Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 16:26:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SCTimer-unified-counter-problem/m-p/1430786#M48268</guid>
      <dc:creator>Deltadragon92</dc:creator>
      <dc:date>2022-03-18T16:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: SCTimer unified counter problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCTimer-unified-counter-problem/m-p/1431732#M48292</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;How about refer to the simple PWM demo under SDK:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1647933056347.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/174358i8EF69E7A72CF90D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1647933056347.png" alt="Alice_Yang_0-1647933056347.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 07:11:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SCTimer-unified-counter-problem/m-p/1431732#M48292</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-03-22T07:11:02Z</dc:date>
    </item>
  </channel>
</rss>

