<?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: ADC hardware trigger using FTM on KV30 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-hardware-trigger-using-FTM-on-KV30/m-p/718697#M44060</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that you forget to enable the generation of the trigger when the FTM counter is equal to the CNTIN register:&lt;/P&gt;&lt;P&gt;FTM1-&amp;gt;EXTTRIG |=FTM_EXTTRIG_INITTRIGEN_MASK;&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>Wed, 11 Apr 2018 09:17:23 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2018-04-11T09:17:23Z</dc:date>
    <item>
      <title>ADC hardware trigger using FTM on KV30</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-hardware-trigger-using-FTM-on-KV30/m-p/718696#M44059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't seem to get the ADC on a KV30 to hardware trigger.&amp;nbsp; I have tried various clock settings, the surrent setting allow it to software trigger.&amp;nbsp; I have in interrupt on ADC completion so I can tell if it is working.&amp;nbsp; The end goal is to use DMA for scan three channels.&amp;nbsp; The application is a Bidirectional DCDC converter based on a a pair of TI LM5170.&amp;nbsp; The bus clock is 48MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem to find any documentation that say the ADC can't be triggered from FTM1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define ADC_PERIOD 10000U // in uS&lt;BR /&gt;#define ADC_FTM_BASEADDR FTM1&lt;BR /&gt;#define ADC_FTM_SOURCE_CLOCK (CLOCK_GetFreq(kCLOCK_BusClk)/16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adc16_config_t adc16ConfigStruct;&lt;BR /&gt; adc16_channel_config_t adc16ChannelConfigStruct;&lt;BR /&gt; ADC16_GetDefaultConfig(&amp;amp;adc16ConfigStruct);&lt;/P&gt;&lt;P&gt;adc16ConfigStruct.referenceVoltageSource = kADC16_ReferenceVoltageSourceVref;&lt;BR /&gt; adc16ConfigStruct.clockSource = kADC16_ClockSourceAlt0;&lt;BR /&gt; adc16ConfigStruct.enableAsynchronousClock = false;&lt;BR /&gt; adc16ConfigStruct.clockDivider = kADC16_ClockDivider4;&lt;BR /&gt; adc16ConfigStruct.resolution = kADC16_ResolutionSE12Bit;&lt;BR /&gt; adc16ConfigStruct.longSampleMode = kADC16_LongSampleDisabled;&lt;BR /&gt; adc16ConfigStruct.enableHighSpeed = true;&lt;BR /&gt; adc16ConfigStruct.enableLowPower = false;&lt;BR /&gt; adc16ConfigStruct.enableContinuousConversion = false;&lt;/P&gt;&lt;P&gt;ADC16_Init( ADC0, &amp;amp;adc16ConfigStruct);&lt;/P&gt;&lt;P&gt;ADC16_DoAutoCalibration( ADC0 );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADC16_EnableHardwareTrigger( ADC0, true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adc16ChannelConfigStruct.channelNumber = ADC_mux[0];&lt;BR /&gt; adc16ChannelConfigStruct.enableDifferentialConversion = false;&lt;/P&gt;&lt;P&gt;ADC16_SetChannelConfig( ADC0, 0, &amp;amp;adc16ChannelConfigStruct);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ftm_config_t ftm_info;&lt;BR /&gt; FTM_GetDefaultConfig(&amp;amp;ftm_info);&lt;BR /&gt; ftm_info.prescale = kFTM_Prescale_Divide_16;&lt;BR /&gt; FTM_Init(ADC_FTM_BASEADDR, &amp;amp;ftm_info);&lt;BR /&gt; FTM_EnableInterrupts(ADC_FTM_BASEADDR, kFTM_TimeOverflowInterruptEnable);&lt;BR /&gt; FTM_SetTimerPeriod(ADC_FTM_BASEADDR, USEC_TO_COUNT(ADC_PERIOD, ADC_FTM_SOURCE_CLOCK));&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT7 = 0X89;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FTM_StartTimer(ADC_FTM_BASEADDR, kFTM_SystemClock);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 00:50:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-hardware-trigger-using-FTM-on-KV30/m-p/718696#M44059</guid>
      <dc:creator>christianlees</dc:creator>
      <dc:date>2018-04-10T00:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: ADC hardware trigger using FTM on KV30</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-hardware-trigger-using-FTM-on-KV30/m-p/718697#M44060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that you forget to enable the generation of the trigger when the FTM counter is equal to the CNTIN register:&lt;/P&gt;&lt;P&gt;FTM1-&amp;gt;EXTTRIG |=FTM_EXTTRIG_INITTRIGEN_MASK;&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>Wed, 11 Apr 2018 09:17:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-hardware-trigger-using-FTM-on-KV30/m-p/718697#M44060</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-04-11T09:17:23Z</dc:date>
    </item>
  </channel>
</rss>

