<?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>Processor Expert SoftwareのトピックRe: ADC triggered by FMT</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188548#M577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a solution to use the FMT to trigger an ADC. Attached you find a example project that works on the K60F120 TWR Board. The example uses the ADC_LDD and Init_FMT components. I used them because the ADC_LDD gives you access to the different methods and Init_FMT allows you to setup a FMT modul to generate the hardware triggers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is interesting to note:&lt;/P&gt;&lt;P&gt;The ADC that is triggered by a FMT can only convert 1 channel. I tried to setup another to add another ADC_LDD for the same ADC converter - this experiment fails. So you can just convert one channel of an ADC by a FMT component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a PDB is a little bit better because you can setup two triggers for one ADC converter. However does one have an idea what to do to convert more then two channels triggered by a onchip component?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Aug 2012 23:58:17 GMT</pubDate>
    <dc:creator>mkrug</dc:creator>
    <dc:date>2012-08-15T23:58:17Z</dc:date>
    <item>
      <title>ADC triggered by FMT</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188546#M575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a K60 TWR system and want to setup a timer that triggers with a certain period the ADC1 converter (used by the onboard potentiometer). So I setup the Trigger of the ADC as follows:&lt;/P&gt;&lt;P&gt;Trigger: enabled&lt;/P&gt;&lt;P&gt;Trigger signal list: 1&lt;/P&gt;&lt;P&gt;Trigger signal 0: Enabled&lt;/P&gt;&lt;P&gt;Trigger input: Flex_timer_0&lt;/P&gt;&lt;P&gt;Trigger type: internal&lt;/P&gt;&lt;P&gt;Source component: TU1 (thats the name of my timer)&lt;/P&gt;&lt;P&gt;Trigger activate state: Rising edge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The FMT0 is configured as:&lt;/P&gt;&lt;P&gt;Component name: TU1&lt;/P&gt;&lt;P&gt;Module name: FTM0&lt;/P&gt;&lt;P&gt;Counter: FTM0_CNT&lt;/P&gt;&lt;P&gt;Counter direction: Up&lt;/P&gt;&lt;P&gt;Counter frequency: 256Hz&lt;/P&gt;&lt;P&gt;Period: 1sec&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My source code looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; ADC1_Data = AD1_Init(NULL);&lt;BR /&gt;&amp;nbsp; SampleGroup[0].ChannelIdx = 0U;&lt;BR /&gt;&amp;nbsp; Error = AD1_CreateSampleGroup(ADC1_Data, (LDD_ADC_TSample *)SampleGroup, SAMPLE_GROUP_SIZE);&lt;BR /&gt;&amp;nbsp; Error = AD1_StartLoopTriggeredMeasurement(ADC1_Data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I thought the ADC should convert every second. However it does not - what did I wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW - how can I synchronize a PDB Block to an overrun/restart of a FMT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 21:46:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188546#M575</guid>
      <dc:creator>mkrug</dc:creator>
      <dc:date>2012-08-13T21:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: ADC triggered by FMT</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188547#M576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that I have answered your first question within this thread:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="117612" class="jive_macro jive_macro_thread default_title" href="https://community.freescale.com/thread/117612" jivemacro="thread" title="https://community.freescale.com/thread/117612"&gt;https://community.freescale.com/thread/117612&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You must additionaly write to the EXTTRIG register in user code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 19:43:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188547#M576</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-08-14T19:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: ADC triggered by FMT</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188548#M577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a solution to use the FMT to trigger an ADC. Attached you find a example project that works on the K60F120 TWR Board. The example uses the ADC_LDD and Init_FMT components. I used them because the ADC_LDD gives you access to the different methods and Init_FMT allows you to setup a FMT modul to generate the hardware triggers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is interesting to note:&lt;/P&gt;&lt;P&gt;The ADC that is triggered by a FMT can only convert 1 channel. I tried to setup another to add another ADC_LDD for the same ADC converter - this experiment fails. So you can just convert one channel of an ADC by a FMT component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a PDB is a little bit better because you can setup two triggers for one ADC converter. However does one have an idea what to do to convert more then two channels triggered by a onchip component?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 23:58:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188548#M577</guid>
      <dc:creator>mkrug</dc:creator>
      <dc:date>2012-08-15T23:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: ADC triggered by FMT</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188549#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the triggering with FTM - yes, this is a limitation of the hardware, on K60 only one trigger from FTM is available.&lt;/P&gt;&lt;P&gt;For two triggers, the PDB can be used.&lt;/P&gt;&lt;P&gt;If you need more channels than 2 to be measured, you need to change the channel after each conversion within the OnMeasurementComplete event code (using SelectSampleGroup method, see the Typical usage help page for the ADC_LDD component).&lt;/P&gt;&lt;P&gt;Another possibility would be to use DMA for both configuring the channel and reading the result. However this is not a technique supported by the ADC_LDD component and the code is highly platform specific for the K60. I attach an example measuring multiple channels using PEx peripheral initialization components.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Petr Hradsky&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 19:22:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/ADC-triggered-by-FMT/m-p/188549#M578</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-08-21T19:22:27Z</dc:date>
    </item>
  </channel>
</rss>

