<?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 ADC in free run in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774944#M47114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning&lt;/P&gt;&lt;P&gt;I want to use the ADC in free run. I init a clock as fast as possible for having the fastest speed. For testing the speed I enable the interrupt and I toggle one I/O every tick,. The result on the scope is not what I expect. The rate is very irregular. I don t get the point.&lt;/P&gt;&lt;P&gt;I am using the FRDM for K64. The BUS clock is 60 MHz. The division is 4 so the ADCLK is 15MHz. It should be ok for the 8 bit resolution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a suggestion for the irregularity of the interrupt??&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jan 2018 11:41:10 GMT</pubDate>
    <dc:creator>pietrodicastri</dc:creator>
    <dc:date>2018-01-09T11:41:10Z</dc:date>
    <item>
      <title>ADC in free run</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774944#M47114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning&lt;/P&gt;&lt;P&gt;I want to use the ADC in free run. I init a clock as fast as possible for having the fastest speed. For testing the speed I enable the interrupt and I toggle one I/O every tick,. The result on the scope is not what I expect. The rate is very irregular. I don t get the point.&lt;/P&gt;&lt;P&gt;I am using the FRDM for K64. The BUS clock is 60 MHz. The division is 4 so the ADCLK is 15MHz. It should be ok for the 8 bit resolution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a suggestion for the irregularity of the interrupt??&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 11:41:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774944#M47114</guid>
      <dc:creator>pietrodicastri</dc:creator>
      <dc:date>2018-01-09T11:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: ADC in free run</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774945#M47115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good moirning&lt;/P&gt;&lt;P&gt;I would like to have a support. I dump here a view of the code&amp;nbsp; I use.&lt;A href="https://community.nxp.com/community/kinetis"&gt;https://community.nxp.com/community/kinetis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/**&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The code for the adc&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;static void ADC16_Configuration(void)&lt;BR /&gt;{&lt;BR /&gt; adc16_config_t adcUserConfig;&lt;BR /&gt; adc16_channel_config_t adc16ChannelConfigStruct;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /*&lt;BR /&gt; * Initialization ADC for 16bit resolution, DMA mode, normal convert speed, VREFH/L as reference,&lt;BR /&gt; * enable continuous convert mode.&lt;BR /&gt; */&lt;BR /&gt; ADC16_GetDefaultConfig( &amp;amp;adcUserConfig );&lt;BR /&gt; adcUserConfig.referenceVoltageSource = kADC16_ReferenceVoltageSourceVref;&lt;BR /&gt; adcUserConfig.clockSource = kADC16_ClockSourceAlt0;&lt;BR /&gt; adcUserConfig.enableAsynchronousClock = true;&lt;BR /&gt; adcUserConfig.clockDivider = kADC16_ClockDivider4;&lt;BR /&gt; adcUserConfig.resolution = kADC16_ResolutionSE8Bit;&lt;BR /&gt; adcUserConfig.longSampleMode = kADC16_LongSampleDisabled;&lt;BR /&gt; adcUserConfig.enableHighSpeed = true;&lt;BR /&gt; adcUserConfig.enableLowPower = false;&lt;BR /&gt; adcUserConfig.enableContinuousConversion = true;&lt;/P&gt;&lt;P&gt;// adcUserConfig.resolution = kADC16_Resolution16Bit;&lt;BR /&gt; // adcUserConfig.clockSource = kADC16_ClockSourceAsynchronousClock;&lt;/P&gt;&lt;P&gt;// adcUserConfig.enableLowPower = true;&lt;BR /&gt;#if ((defined BOARD_ADC_USE_ALT_VREF) &amp;amp;&amp;amp; BOARD_ADC_USE_ALT_VREF)&lt;BR /&gt; adcUserConfig.referenceVoltageSource = kADC16_ReferenceVoltageSourceValt;&lt;BR /&gt;#endif&lt;BR /&gt; ADC16_Init( DEMO_ADC16_BASEADDR, &amp;amp;adcUserConfig );&lt;BR /&gt; ADC16_EnableHardwareTrigger( DEMO_ADC16_BASEADDR, false );&lt;/P&gt;&lt;P&gt;#if defined(FSL_FEATURE_ADC16_HAS_CALIBRATION) &amp;amp;&amp;amp; FSL_FEATURE_ADC16_HAS_CALIBRATION&lt;BR /&gt; /* Auto calibration */&lt;BR /&gt; if ( kStatus_Success == ADC16_DoAutoCalibration( DEMO_ADC16_BASEADDR ) )&lt;BR /&gt; {&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; }&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Enable software trigger. */&lt;BR /&gt; ADC16_EnableHardwareTrigger( DEMO_ADC16_BASEADDR, false );&lt;/P&gt;&lt;P&gt;adc16ChannelConfigStruct.channelNumber = DEMO_ADC_USER_CHANNEL;&lt;BR /&gt; adc16ChannelConfigStruct.enableInterruptOnConversionCompleted = true; /* Enable the interrupt. */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC16_HAS_DIFF_MODE) &amp;amp;&amp;amp; FSL_FEATURE_ADC16_HAS_DIFF_MODE&lt;BR /&gt; adc16ChannelConfigStruct.enableDifferentialConversion = false;&lt;BR /&gt;#endif /* FSL_FEATURE_ADC16_HAS_DIFF_MODE */&lt;BR /&gt; /* Disable DMA. */&lt;BR /&gt; ADC16_EnableDMA( DEMO_ADC16_BASEADDR, false );&lt;BR /&gt; INT_SYS_EnableIRQ( ADC0_IRQn );&lt;BR /&gt; ADC16_SetChannelConfig( DEMO_ADC_BASE, DEMO_ADC_CHANNEL_GROUP, &amp;amp;adc16ChannelConfigStruct );&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;* The interrupt handler . Just does nothing than toggling the I/O for the scope&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;void DEMO_ADC_IRQ_HANDLER(void)&lt;BR /&gt;{&lt;BR /&gt; toggle();&lt;BR /&gt; /* Read to clear COCO flag. */&lt;BR /&gt; int32_t g_AdcConvValue = ADC16_GetChannelConversionValue(DEMO_ADC_BASE, DEMO_ADC_CHANNEL_GROUP);&lt;BR /&gt; /* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping&lt;BR /&gt; exception return operation might vector to incorrect interrupt */&lt;BR /&gt;#if defined __CORTEX_M &amp;amp;&amp;amp; (__CORTEX_M == 4U)&lt;BR /&gt; __DSB();&lt;BR /&gt;#endif&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 06:43:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774945#M47115</guid>
      <dc:creator>pietrodicastri</dc:creator>
      <dc:date>2018-01-10T06:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: ADC in free run</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774946#M47116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pietro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another way to observe the ADC conversion rate instead of toggle IO.&lt;BR /&gt;Please refer: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335533"&gt;verify ADC conversion rate with oscilloscope&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 07:33:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774946#M47116</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-01-11T07:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: ADC in free run</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774947#M47117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;I am interested in having a look at your project, thank You for the suggestion.&lt;/P&gt;&lt;P&gt;I am now struggling with some urgent delivery. Just a small question. is the processor running&lt;/P&gt;&lt;P&gt;at 120 MHz in the example ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pietro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 07:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774947#M47117</guid>
      <dc:creator>pietrodicastri</dc:creator>
      <dc:date>2018-01-19T07:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: ADC in free run</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774948#M47118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. In order to get 18MHz fADCK, I am not using 120MHz core clock in that demo.&lt;/P&gt;&lt;P&gt;I have modify that demo for you to refer: 120MHz Core \ 60MHz Bus \ 15MHz fADCK&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="fADCK 12MHz 8bit 789kHz.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20196i26765E0DCE937120/image-size/large?v=v2&amp;amp;px=999" role="button" title="fADCK 12MHz 8bit 789kHz.jpg" alt="fADCK 12MHz 8bit 789kHz.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="K64 120MHz.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20236i0F8A81384AB87141/image-size/large?v=v2&amp;amp;px=999" role="button" title="K64 120MHz.jpg" alt="K64 120MHz.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2018 06:12:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-in-free-run/m-p/774948#M47118</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-01-22T06:12:49Z</dc:date>
    </item>
  </channel>
</rss>

