AnsweredAssumed Answered

ADC triggered by FMT

Question asked by Markus Krug on Aug 13, 2012
Latest reply on Aug 21, 2012 by Processor Expert



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:

Trigger: enabled

Trigger signal list: 1

Trigger signal 0: Enabled

Trigger input: Flex_timer_0

Trigger type: internal

Source component: TU1 (thats the name of my timer)

Trigger activate state: Rising edge



The FMT0 is configured as:

Component name: TU1

Module name: FTM0

Counter: FTM0_CNT

Counter direction: Up

Counter frequency: 256Hz

Period: 1sec



My source code looks like:

  ADC1_Data = AD1_Init(NULL);
  SampleGroup[0].ChannelIdx = 0U;
  Error = AD1_CreateSampleGroup(ADC1_Data, (LDD_ADC_TSample *)SampleGroup, SAMPLE_GROUP_SIZE);
  Error = AD1_StartLoopTriggeredMeasurement(ADC1_Data);



So I thought the ADC should convert every second. However it does not - what did I wrong?


BTW - how can I synchronize a PDB Block to an overrun/restart of a FMT.


Best Regards