<?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 SARADC's  conversion clock frequency in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1416569#M62484</link>
    <description>&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;P&gt;I'm using MKM34Z256VLL7 and I'm having trouble with the SAR-ADC initialization.&lt;BR /&gt;The source is shown below.&lt;BR /&gt;On line 21, set clockSource to kADC16_ClockSourceAlt2, BUSCLOCK/2 =20.97152MHz/2 =10.48576MHz.&lt;BR /&gt;(clockDivider = kADC16_ClockDivider8)&lt;BR /&gt;Then, in ADC16_DoAutoCalibration(), kADC16_ChannelConversionDoneFlag does not stand, so it becomes an infinite loop.&lt;BR /&gt;Please let me know why clockSource = kADC16_ClockSourceAlt2 is not good.&lt;BR /&gt;I read in the datasheet that the ADC CONVERSION CLOCK should be less than 18MHz.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;void adcInitialize(void)&lt;BR /&gt;{&lt;BR /&gt;adc16_config_t config;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* config-&amp;gt;referenceVoltageSource = kADC16_ReferenceVoltageSourceVref;&lt;BR /&gt;* config-&amp;gt;clockSource = kADC16_ClockSourceAsynchronousClock;&lt;BR /&gt;* config-&amp;gt;enableAsynchronousClock = true;&lt;BR /&gt;* config-&amp;gt;clockDivider = kADC16_ClockDivider8;&lt;BR /&gt;* config-&amp;gt;resolution = kADC16_ResolutionSE12Bit;&lt;BR /&gt;* config-&amp;gt;longSampleMode = kADC16_LongSampleDisabled;&lt;BR /&gt;* config-&amp;gt;enableHighSpeed = false;&lt;BR /&gt;* config-&amp;gt;enableLowPower = false;&lt;BR /&gt;* config-&amp;gt;enableContinuousConversion = false;&lt;BR /&gt;* config-&amp;gt;hardwareAverageMode = kADC16_HardwareAverageDisabled;&lt;BR /&gt;*/&lt;BR /&gt;ADC16_GetDefaultConfig(&amp;amp;config);&lt;/P&gt;&lt;P&gt;config.referenceVoltageSource = kADC16_ReferenceVoltageSourceValt;&lt;/P&gt;&lt;P&gt;config.clockSource = kADC16_ClockSourceAlt2; // BUSCLOCK/2 =20.97152MHz/2 =10.48576MHz&lt;BR /&gt;config.longSampleMode = kADC16_LongSampleCycle24;&lt;BR /&gt;config.hardwareAverageMode = kADC16_HardwareAverageCount32;&lt;BR /&gt;ADC16_Init(ADC0, &amp;amp;config);&lt;/P&gt;&lt;P&gt;ADC16_EnableHardwareTrigger(ADC0, false);&lt;BR /&gt;ADC16_SetHardwareCompareConfig(ADC0, NULL);&lt;/P&gt;&lt;P&gt;if ((status_t)kStatus_Success == ADC16_DoAutoCalibration(ADC0)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;The following is omitted.&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 08:02:14 GMT</pubDate>
    <dc:creator>jun1</dc:creator>
    <dc:date>2022-02-21T08:02:14Z</dc:date>
    <item>
      <title>SARADC's  conversion clock frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1416569#M62484</link>
      <description>&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;P&gt;I'm using MKM34Z256VLL7 and I'm having trouble with the SAR-ADC initialization.&lt;BR /&gt;The source is shown below.&lt;BR /&gt;On line 21, set clockSource to kADC16_ClockSourceAlt2, BUSCLOCK/2 =20.97152MHz/2 =10.48576MHz.&lt;BR /&gt;(clockDivider = kADC16_ClockDivider8)&lt;BR /&gt;Then, in ADC16_DoAutoCalibration(), kADC16_ChannelConversionDoneFlag does not stand, so it becomes an infinite loop.&lt;BR /&gt;Please let me know why clockSource = kADC16_ClockSourceAlt2 is not good.&lt;BR /&gt;I read in the datasheet that the ADC CONVERSION CLOCK should be less than 18MHz.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;void adcInitialize(void)&lt;BR /&gt;{&lt;BR /&gt;adc16_config_t config;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* config-&amp;gt;referenceVoltageSource = kADC16_ReferenceVoltageSourceVref;&lt;BR /&gt;* config-&amp;gt;clockSource = kADC16_ClockSourceAsynchronousClock;&lt;BR /&gt;* config-&amp;gt;enableAsynchronousClock = true;&lt;BR /&gt;* config-&amp;gt;clockDivider = kADC16_ClockDivider8;&lt;BR /&gt;* config-&amp;gt;resolution = kADC16_ResolutionSE12Bit;&lt;BR /&gt;* config-&amp;gt;longSampleMode = kADC16_LongSampleDisabled;&lt;BR /&gt;* config-&amp;gt;enableHighSpeed = false;&lt;BR /&gt;* config-&amp;gt;enableLowPower = false;&lt;BR /&gt;* config-&amp;gt;enableContinuousConversion = false;&lt;BR /&gt;* config-&amp;gt;hardwareAverageMode = kADC16_HardwareAverageDisabled;&lt;BR /&gt;*/&lt;BR /&gt;ADC16_GetDefaultConfig(&amp;amp;config);&lt;/P&gt;&lt;P&gt;config.referenceVoltageSource = kADC16_ReferenceVoltageSourceValt;&lt;/P&gt;&lt;P&gt;config.clockSource = kADC16_ClockSourceAlt2; // BUSCLOCK/2 =20.97152MHz/2 =10.48576MHz&lt;BR /&gt;config.longSampleMode = kADC16_LongSampleCycle24;&lt;BR /&gt;config.hardwareAverageMode = kADC16_HardwareAverageCount32;&lt;BR /&gt;ADC16_Init(ADC0, &amp;amp;config);&lt;/P&gt;&lt;P&gt;ADC16_EnableHardwareTrigger(ADC0, false);&lt;BR /&gt;ADC16_SetHardwareCompareConfig(ADC0, NULL);&lt;/P&gt;&lt;P&gt;if ((status_t)kStatus_Success == ADC16_DoAutoCalibration(ADC0)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;The following is omitted.&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 08:02:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1416569#M62484</guid>
      <dc:creator>jun1</dc:creator>
      <dc:date>2022-02-21T08:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: SARADC's  conversion clock frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1417916#M62494</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/79895"&gt;@jun1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Yes, it looks like a hardware problem. The BUSCLK/2 is not really send to ADC. You can get around this issue by using Alt0 and CFG1[ADIV] field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 05:31:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1417916#M62494</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-02-23T05:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: SARADC's  conversion clock frequency</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1418157#M62498</link>
      <description>&lt;P&gt;I am always very grateful for your help.&lt;BR /&gt;Roger that, I'll set it up with busclk.&lt;BR /&gt;Thank you very much.&lt;BR /&gt;Have a nice day.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 10:16:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SARADC-s-conversion-clock-frequency/m-p/1418157#M62498</guid>
      <dc:creator>jun1</dc:creator>
      <dc:date>2022-02-23T10:16:42Z</dc:date>
    </item>
  </channel>
</rss>

