2013-04-03 4:35 AM
Hi,
I create a TIM8 mode up and down using this InstructionTIM_TimeBaseStructure.TIM_Period = 2000;
TIM_TimeBaseStructure.TIM_Prescaler = PrescalerValue;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_CenterAligned3;
 TIM_TimeBaseInit(TIM8, &TIM_TimeBaseStructure);
   
   
  TIM8->CCR1 = 1500 ; 
// PC6 Signal 1   
   I have another part of my program that read ADC value of 5 signal using DMA. 
   
   I want to trigger the reading of ADC 4 time in period (The red circled in figure) 
   
   Ie when TIM8 = 0 , TIM8 = 1500 Up,, TIM8 = 2000, TIM8 = 1500 Down memorize them then repeat the cycle conversion . 
   
   I use this line in ADC configuration 
   
   
  ADC_InitStructure.ADC_ScanConvMode = ENABLE;
 ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;
 ADC_InitStructure.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_RisingFalling; 
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T8_CC1;   
   But i don't know what this 2 line do exactly :\ 
   And how to verify if The trigger works in the desired Time or no ? 
   
   Can someone help me to read ADC in this 4 time 
   
   Thanks :)   
    
  2013-04-12 1:30 AM
Any help
Thanks :)