Question
ADC Trigger TIM8
Posted on April 02, 2013 at 13:03
Then I create a PWM signal using TIM8_CH1
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);
Then I create a PWM signal using TIM8_CH1
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 = 1500 Down, TIM8 = 2000, ...
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 :)