<?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: LPC55xx A/D interrupt</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568416#M50997</link>
    <description>&lt;P&gt;I don't know what happened (I don't remember having touched anything regarding ADC/CTIMER configuration), but now I observe the same behavior that you reported. The ADC ISR is called permanently with a much higher frequency than the CTIMER trigger.&lt;/P&gt;&lt;P&gt;How did you resolve this issue?&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Dan&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2022 15:17:31 GMT</pubDate>
    <dc:creator>danielholala</dc:creator>
    <dc:date>2022-12-12T15:17:31Z</dc:date>
    <item>
      <title>LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1567060#M50983</link>
      <description>&lt;P&gt;I am using a LPC5502 with the A/D converter being triggered by the CTIMER0, which should sample 1600 times a second. The A/D triggers an interrupt when the scan is complete.&lt;/P&gt;&lt;P&gt;However, my interrupt routine appears to run continuously (running once every 50us).&lt;/P&gt;&lt;P&gt;Is there a flag that needs to be cleared? Is it cleared by writing a zero or by writing a 1?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 20:19:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1567060#M50983</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2022-12-08T20:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568247#M50994</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/132886"&gt;@ianbenton&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I have the same application in mind but I'm struggling to get CTIMER to trigger ADC. If I understand the user manual correctly, ADC conversion can be triggered by CTIMER directly. With "directly" I mean, that the trigger mechanism is done in hardware and not implemented in software (by writing a timer ISR that writes to ADC register SWTRIG to generate a software trigger). Could you please provide your configuration?&lt;/P&gt;&lt;P&gt;For your information, I have CTIMER configured as follows using Peripheral Tools, see screenshot below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielholala_3-1670844707366.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/204016i5A4064AC7ED0D384/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielholala_3-1670844707366.png" alt="danielholala_3-1670844707366.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I start the timer manually in my code. The timer is running as I can see that the TC register is running.&lt;/P&gt;&lt;P&gt;Do I have to select an "output control" and do I have to route the output to an actual pin? I assume that "Toggle bit" means that the actual trigger rate is reduced by factor two as the "&lt;EM&gt;hardware trigger events are detected on the rising-edge of the associated hardware trigger source&lt;/EM&gt;." (according to the manual).&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 13:57:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568247#M50994</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-12T13:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568416#M50997</link>
      <description>&lt;P&gt;I don't know what happened (I don't remember having touched anything regarding ADC/CTIMER configuration), but now I observe the same behavior that you reported. The ADC ISR is called permanently with a much higher frequency than the CTIMER trigger.&lt;/P&gt;&lt;P&gt;How did you resolve this issue?&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 15:17:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568416#M50997</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-12T15:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568442#M50999</link>
      <description>&lt;P&gt;&lt;STRONG&gt;This won’t help you at all, but I corrected the gormless mistake that I made in calculating the cycle length!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 15:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568442#M50999</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2022-12-12T15:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568446#M51000</link>
      <description>&lt;P&gt;You are right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I should make sure to read out the FIFO completely in ADC ISR. &lt;LI-EMOJI id="lia_face-with-rolling-eyes" title=":face_with_rolling_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 16:09:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568446#M51000</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-12T16:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568461#M51001</link>
      <description>&lt;P&gt;Write HALF the cycle time to MR3 and MST3&lt;/P&gt;&lt;P&gt;Set bits 10 and 27 in MCR to make it reset and reload.&lt;/P&gt;&lt;P&gt;Set bits 10 and 11 of EMR to make it toggle on match (that’s why you need half the cycle time)&lt;/P&gt;&lt;P&gt;Set bit 0 of TCR to make it go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then set bits 0 and 24 in TCTRL5 in the A/D to make it trigger from input 5 and run command 1.&lt;/P&gt;&lt;P&gt;if you need an interrupt when it has finished, set bit 21 of IE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the A/D, set bits 0 and 24 of TCTRL5 to enable the trigger from input 5 and run CMD0 ( or whatever command you want it to run)&lt;/P&gt;&lt;P&gt;if you want an interrupt when it has completed the conversion, set bit 21 of IE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 16:30:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1568461#M51001</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2022-12-12T16:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx A/D interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1569046#M51008</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/132886"&gt;@ianbenton&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for confirming that configuring external match register (EMR) to &lt;STRONG&gt;toggle&lt;/STRONG&gt; the output bit (EMR[EMC3] = 0x3) will effectively double the cycle time. That's exactly how I configured the timer. I was unsure about this as it &lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/Hw-trigger-ADC-using-CT-timers/m-p/1051078/highlight/true#M40725" target="_self"&gt;has been recommended&lt;/A&gt; to &lt;STRONG&gt;set&lt;/STRONG&gt; the output bit instead. But then you need to reset the bit somewhere (e.g., ISR) manually.&lt;/P&gt;&lt;P&gt;Further, I noticed that the FIFO overflows while single stepping during debugging. This also created perpetual irqs (as I had enabled fifo overflow interrupt but not yet handled it in my code).&lt;/P&gt;&lt;P&gt;I think I'm getting there &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:41:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-A-D-interrupt/m-p/1569046#M51008</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-13T14:41:35Z</dc:date>
    </item>
  </channel>
</rss>

