<?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: Hw trigger ADC using CT timers in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1568384#M50996</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you suggest to set EMC3 (in the external match register EMR of the timer) to &lt;STRONG&gt;0x2&lt;/STRONG&gt;. This bit means "&lt;EM&gt;&lt;STRONG&gt;Set&lt;/STRONG&gt; the corresponding External Match bit/output EM3 to 1&lt;/EM&gt;".&amp;nbsp;Thus when a match occurs between the TC and MR3, the EM3 bit is set and generates the corresponding ADC trigger (if enabled).&lt;/P&gt;&lt;P&gt;However, the manual also states "&lt;EM&gt;hardware trigger events are detected &lt;STRONG&gt;on the r&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;ising-edge&lt;/STRONG&gt; of the associated hardware trigger source.&lt;/EM&gt;". Thus until the EM3 bit in EMC is reset, no further hardware trigger through CTIMER will occur.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you suggest to handle this problem? Reset EM3 bit through ADC ISR?&lt;/P&gt;&lt;P&gt;Instead, I've set EMC3 to &lt;STRONG&gt;0x3&lt;/STRONG&gt;, that is "&lt;STRONG&gt;Toggle&lt;/STRONG&gt; EM3 bit". This triggers ADC on every other timer cycle: The first timer match&amp;nbsp;&lt;STRONG&gt;sets&lt;/STRONG&gt; the EM3 bit which in turn generates the ADC hardware trigger. The next timer match &lt;STRONG&gt;resets&lt;/STRONG&gt; the EM3 bit. This effectively reduces the trigger frequency by 2.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 08:17:35 GMT</pubDate>
    <dc:creator>danielholala</dc:creator>
    <dc:date>2022-12-15T08:17:35Z</dc:date>
    <item>
      <title>Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051073#M40720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;Hello,&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;I am using the LPC55s69 Dev kit&lt;/SPAN&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;I need to configure the ADC to be triggered from an CT timers. and then the DMA to copy the data to RAM.&lt;/SPAN&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;I am using the SDK 2.6.3.&amp;nbsp;&lt;/SPAN&gt;&lt;BR style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;whats needed:&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;use an CT as a HW trigger and have the dma automatically copying data into a Ram buffer.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;Any help would be appreciated&lt;/SPAN&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;BR data-jive-statusinputadd="true" data-jive-truncation-flag="true" style="color: #222222;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff;"&gt;Sushant Kulkarni&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2020 15:37:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051073#M40720</guid>
      <dc:creator>kulkar68</dc:creator>
      <dc:date>2020-06-03T15:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051074#M40721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need to convert sw triggered sdk example to hw trigger . please provide configuration and other chnages required .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2020 15:40:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051074#M40721</guid>
      <dc:creator>kulkar68</dc:creator>
      <dc:date>2020-06-03T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051075#M40722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sushant,&lt;/P&gt;&lt;P&gt;There are Ctimer, ADC and DMA demos under SDK, you can refer to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/111946iEEC122D861E5CAF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BTW, recommend you use the latest version of SDKv2.7.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; padding: 0px; border: 0px; font-weight: 400; font-style: normal; font-size: 15px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: #51626f; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word;"&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P style="margin: 0px; padding: 0px; border: 0px; font-weight: 400; font-style: normal; font-size: 15px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: #51626f; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; min-height: 8pt; overflow-wrap: break-word;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0px; padding: 0px; border: 0px; font-weight: 400; font-style: normal; font-size: 15px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: #51626f; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word;"&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 style="margin: 0px; padding: 0px; border: 0px; font-weight: 400; font-style: normal; font-size: 15px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: #51626f; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; min-height: 8pt; overflow-wrap: break-word;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0px; padding: 0px; border: 0px; font-weight: 400; font-style: normal; font-size: 15px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: #51626f; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word;"&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;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2020 04:11:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051075#M40722</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-06-04T04:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051076#M40723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alice,&lt;/P&gt;&lt;P&gt;I am modifying existing lpadc_dma example provided with SDK&lt;/P&gt;&lt;P&gt;i checked all peripheral ADC, Ctimer and DMA individually. problem is with integration of all three.&lt;/P&gt;&lt;P&gt;I have configured following:&lt;/P&gt;&lt;P&gt;ADC:&lt;/P&gt;&lt;P&gt;enabled hardware trigger 5&lt;/P&gt;&lt;P&gt;5 State Counter Timer (CTIMER) ct0_mat3_out via&amp;nbsp;TCTRLa[HTEN] for index 5&lt;/P&gt;&lt;P&gt;TCTRLa[TPRI] is kept 0&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ctimer:&lt;/P&gt;&lt;P&gt;#define CTIMER CTIMER0 /* Timer 0 */&lt;BR /&gt;#define CTIMER_MAT_OUT kCTIMER_Match_3 /* Match output 3 */&lt;BR /&gt;#define CTIMER_CLK_FREQ CLOCK_GetCTimerClkFreq(2U)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;config:&lt;/P&gt;&lt;P&gt;matchConfig.enableCounterReset = true;&lt;BR /&gt; matchConfig.enableCounterStop = false;&lt;BR /&gt; matchConfig.matchValue = CTIMER_CLK_FREQ / 4;&lt;BR /&gt; matchConfig.outControl = kCTIMER_Output_Toggle;&lt;BR /&gt; matchConfig.outPinInitState = true;&lt;BR /&gt; matchConfig.enableInterrupt = false;&lt;BR /&gt; CTIMER_SetupMatch(CTIMER, CTIMER_MAT_OUT, &amp;amp;matchConfig);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DMA&amp;nbsp;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;No modification from Lpadc_dma example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changes in main:&lt;/P&gt;&lt;P&gt;Removed getchar() and&amp;nbsp;LPADC_DoSoftwareTrigger(). and called&amp;nbsp;CTIMER_StartTimer(CTIMER) before while(1)&lt;/P&gt;&lt;P&gt;my understanding:&lt;/P&gt;&lt;P&gt;i/p: continious square wave from function generator on P28 on board&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the ctimer value reaches the matchvalue ,&amp;nbsp;CTIMER_MAT_OUT (which is mat_out_3) performs togle operation and reloads timer .&amp;nbsp;&lt;/P&gt;&lt;P&gt;mat_out_3 rising edge acts as hardware trigger to ADC and after conversion it should trigger DMA to transfer from FIFO to ram .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but not able to see output in FIFO or ram variable . so ADC is not triggered .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do tell if any configuration is missing or function call to be done in main.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:46:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051076#M40723</guid>
      <dc:creator>kulkar68</dc:creator>
      <dc:date>2020-06-04T16:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051077#M40724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;continue from above mail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also do i need to enable Interrupt or callback function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:49:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051077#M40724</guid>
      <dc:creator>kulkar68</dc:creator>
      <dc:date>2020-06-04T16:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051078#M40725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sushant ,&lt;/P&gt;&lt;P&gt;- Please first try to use software trigger ADC, whether it can work well?&lt;/P&gt;&lt;P&gt;- If software trigger can work, set the EMC3 of Timer external match registers(EMR) to 0x2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 02:08:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051078#M40725</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-06-10T02:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hw trigger ADC using CT timers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1568384#M50996</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you suggest to set EMC3 (in the external match register EMR of the timer) to &lt;STRONG&gt;0x2&lt;/STRONG&gt;. This bit means "&lt;EM&gt;&lt;STRONG&gt;Set&lt;/STRONG&gt; the corresponding External Match bit/output EM3 to 1&lt;/EM&gt;".&amp;nbsp;Thus when a match occurs between the TC and MR3, the EM3 bit is set and generates the corresponding ADC trigger (if enabled).&lt;/P&gt;&lt;P&gt;However, the manual also states "&lt;EM&gt;hardware trigger events are detected &lt;STRONG&gt;on the r&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;ising-edge&lt;/STRONG&gt; of the associated hardware trigger source.&lt;/EM&gt;". Thus until the EM3 bit in EMC is reset, no further hardware trigger through CTIMER will occur.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you suggest to handle this problem? Reset EM3 bit through ADC ISR?&lt;/P&gt;&lt;P&gt;Instead, I've set EMC3 to &lt;STRONG&gt;0x3&lt;/STRONG&gt;, that is "&lt;STRONG&gt;Toggle&lt;/STRONG&gt; EM3 bit". This triggers ADC on every other timer cycle: The first timer match&amp;nbsp;&lt;STRONG&gt;sets&lt;/STRONG&gt; the EM3 bit which in turn generates the ADC hardware trigger. The next timer match &lt;STRONG&gt;resets&lt;/STRONG&gt; the EM3 bit. This effectively reduces the trigger frequency by 2.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 08:17:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1568384#M50996</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-15T08:17:35Z</dc:date>
    </item>
  </channel>
</rss>

