STM32F103 external Timer trigger for ADC
Hi all.
I'm using STM32F103C and want the Timer1 Capture/Compare event to trigger ADC conversion. Two ADCs operate in dual regular simultaneous mode.
At the moment, I have a working Timer1 with CC1 and CC2 interrupts and two ADCs that operate in dual regular simultaneous mode (software trigger). This configuration works well.
I'm trying to modify the code to trigger ADC conversion with the CC2 event but to no avail.
The code modifications I have tried are
// ADC1 config
// ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC2;
ADC_ExternalTrigConvCmd(ADC1, ENABLE); // added
...
// ADC2 config
// ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC2;
ADC_ExternalTrigConvCmd(ADC2, ENABLE); // added
Question: are there any other suggestions that I can try? Am I missing something in the configuration?
