<?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: Voltage drop every adc trigger in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072437#M41372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Francis,&lt;/P&gt;&lt;P&gt;As the ADC Note3 in data sheet of LPC552x says that you can reach up to 1M Samples per second with the condition:&lt;/P&gt;&lt;P&gt;[3] fclk(ADC) = 24 MHz, STS = 3, Power select = 1, Average setting = 1, fs = 1 Msample/s&lt;/P&gt;&lt;P&gt;If I use 96MHz FRO, you have to use at least divider = 4., pls &lt;/P&gt;&lt;P&gt;I suppose you can set up ADC with above setting, use CTimer to trigger ADC with 1uS period and just sample one channel for each triggering. You can use polling mode to transfer ADC sample to memory, pls have a try.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2020 05:04:35 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2020-07-22T05:04:35Z</dc:date>
    <item>
      <title>Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072432#M41367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently I am using LPC5528, I have to do 1M sample/s ADC sampling continuously, keep streaming out the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach 96M HF clock to adc with divider = 4, STS = 3, 16bit resolution.&lt;/P&gt;&lt;P&gt;loop cnt = 15, it will do 16 times sampling/conversion for each trigger, and write to FIFO0 and FIFO1 alternately&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My implementation is,&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;OL class=""&gt;&lt;LI&gt;Init, &lt;SPAN&gt;sw&amp;nbsp;&lt;/SPAN&gt;trigger adc to write to FIFO0&lt;/LI&gt;&lt;LI&gt;FIFO0 full -&amp;gt; adc isr&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;in adc isr,&amp;nbsp;sw&amp;nbsp;&lt;/SPAN&gt;trigger adc to write to FIFO1 and trigger DMA to copy from FIFO0 to memory&lt;/LI&gt;&lt;LI&gt;FIFO1 full&amp;nbsp;&lt;SPAN&gt;-&amp;gt; adc isr&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;in adc isr,&amp;nbsp;sw&amp;nbsp;&lt;/SPAN&gt;trigger adc to write to FIFO0 and&amp;nbsp;&lt;SPAN&gt;trigger&lt;/SPAN&gt;&amp;nbsp;DMA to copy from FIFO1&amp;nbsp;&lt;SPAN&gt;to memory&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;FIFO0 full&amp;nbsp;&lt;SPAN&gt;-&amp;gt; adc isr&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;repeat 3 - 6&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a delay between each trigger, around 1us.&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. if i feed a sine wave to the adc pin, the line is not smooth at every 16 sample.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please see Figure 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More importantly, there is a voltage drop when the adc start, we can always see a smaller value in FIF0 1st entry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know the ENOB of LPC5528 16bit resolution is 12bit. But the drop is out of this range. And it happens every 16 values, so it must be related to the MCU, not a random noise.&lt;/P&gt;&lt;P&gt;Please see Figure 2&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2020 10:21:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072432#M41367</guid>
      <dc:creator>francisy</dc:creator>
      <dc:date>2020-07-07T10:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072433#M41368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Francis,&lt;/P&gt;&lt;P&gt;I have checked the waveform of the ADC results you attached, I think unequal sampling interval of ADC leads to the issue.&lt;/P&gt;&lt;P&gt;I suggest you use Timer to trigger ADC, you can set up the Timer to control the sampling interval, in this way, the equal interval can be guaranteed. I do not suggest you use software triggering mode if you require to sample in a equal interval.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 04:51:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072433#M41368</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-07-08T04:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072434#M41369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks XiangJun&lt;SPAN&gt;&amp;nbsp;,&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;My target is stream 1MSample/s continuously. If i use timer,&amp;nbsp;sample 16 time every trigger, after 16 sample finish, it will wait for next timer trigger but not start immediately. I&amp;nbsp;will lose the sample in that period.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;But my most important issue is the voltage drop, any idea on the voltage drop?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;br,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Francis&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 07:12:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072434#M41369</guid>
      <dc:creator>francisy</dc:creator>
      <dc:date>2020-07-08T07:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072435#M41370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Francis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the voltage drop, as you know that there is a S/H circuit, which is a capacitor actually, so in the sampling phase, the external analog source charges the capacitor, so the analog end voltage will drop because the external analog source has impedance. In order to reduce the voltage drop, you can use an analog buffer, in other words, you can use an OP amplifier, connect the inverter pin of the AMP to output pin of AMP, connect the external analog signal to the non-inverter pin, it is okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From software perspective, pls set the CMDHT[STS] = 0x7, but it enlarges the conversion time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 13:16:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072435#M41370</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-07-08T13:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072436#M41371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi XiangJun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use larger STS, it really reduces the spike. However, it reduce the sampling rate a lot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is LPC5528 able to achieve continuously 1MSample/s sampling?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to LPC5528 datasheet, it states ADC clock max is 24MHz.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it mean if I use 96MHz FRO, i have to use at least divider = 4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I follow the setting in datasheet, it is not 1MSample/s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fclk(ADC) = 24 MHz, STS = 3, Power select = 1, Average setting = 1, fs = 1 Msample/s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2020 10:05:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072436#M41371</guid>
      <dc:creator>francisy</dc:creator>
      <dc:date>2020-07-21T10:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072437#M41372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Francis,&lt;/P&gt;&lt;P&gt;As the ADC Note3 in data sheet of LPC552x says that you can reach up to 1M Samples per second with the condition:&lt;/P&gt;&lt;P&gt;[3] fclk(ADC) = 24 MHz, STS = 3, Power select = 1, Average setting = 1, fs = 1 Msample/s&lt;/P&gt;&lt;P&gt;If I use 96MHz FRO, you have to use at least divider = 4., pls &lt;/P&gt;&lt;P&gt;I suppose you can set up ADC with above setting, use CTimer to trigger ADC with 1uS period and just sample one channel for each triggering. You can use polling mode to transfer ADC sample to memory, pls have a try.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 05:04:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072437#M41372</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-07-22T05:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072438#M41373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xiangjun,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could NXP provide the code that used for running the test in datasheet, using&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;fclk(ADC) = 24 MHz, STS = 3, Power select = 1, Average setting = 1, fs = 1 Msample/s ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Besides, if I use polling mode &amp;lt;1us interval, it will use most of my CPU time. My application is running freertos.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;If I use higher power setting, can I use 48MHz adc clock? Because LPC551X can do in this way, does LPC552X also allow this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 07:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072438#M41373</guid>
      <dc:creator>francisy</dc:creator>
      <dc:date>2020-07-22T07:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Voltage drop every adc trigger</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072439#M41374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xiangjun,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion. I tried two methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTIMER to trigger every 0.5us, and so rising edge happen very 1us,&amp;nbsp; I read the adc value from RESFIFO when:&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;method 1. CTIMER ISR&lt;/P&gt;&lt;P&gt;method 2. ADC ISR (trigger completion)&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Method 1: i get Zero value often, (every&amp;nbsp;2 samples, it get 1 zero) I think because sample not ready&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Method 2: ADC ISR is not happened every 1us, the interval is longer than 1us.&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;If I increase the ADC input clock, e.g. divider = 1, then it can get sample every 1us.&lt;/P&gt;&lt;P style="padding: 0px;"&gt;What is the impact of using high ADC input clock?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please provide the code that NXP use for verifying the 1MSample/s ADC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 13:53:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Voltage-drop-every-adc-trigger/m-p/1072439#M41374</guid>
      <dc:creator>francisy</dc:creator>
      <dc:date>2020-07-22T13:53:12Z</dc:date>
    </item>
  </channel>
</rss>

