AnsweredAssumed Answered

Trigger ADC1 scan using TIM1 CC1 on F410RB

Question asked by cialdi.massimiliano on Sep 20, 2016
Latest reply on Nov 8, 2017 by Dana Myers
Hi,
I use STM32F410RB, and I need to trigger an ADC1 scan regular conversion every TIM1 CC1 event.
I am sure that TIM1 works, because I have an interrupt that is triggered every CC1 event.
I tried to configure ADC as follows:
01.ADC_ChannelConfTypeDef sConfig;
02. 
03./* ADC Initialization */
04.AdcHandle.Instance          = ADC1;
05. 
06.AdcHandle.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
07.AdcHandle.Init.Resolution = ADC_RESOLUTION_12B;
08.AdcHandle.Init.ScanConvMode = ENABLE;
09.AdcHandle.Init.ContinuousConvMode = DISABLE;
10.AdcHandle.Init.DiscontinuousConvMode = DISABLE;
11.AdcHandle.Init.NbrOfDiscConversion = 0;
12.AdcHandle.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_RISING;
13.AdcHandle.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_T1_CC1;
14.AdcHandle.Init.DataAlign = ADC_DATAALIGN_RIGHT;
15.AdcHandle.Init.NbrOfConversion = 2;
16.AdcHandle.Init.DMAContinuousRequests = DISABLE;
17.AdcHandle.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
18. 
19.HAL_ADC_Init(&AdcHandle);
20. 
21./* Configure ADC3 regular channel */
22.sConfig.Channel = ADC_CHANNEL_0;
23.sConfig.Rank = 1;
24.sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
25.sConfig.Offset = 0;
26. 
27.HAL_ADC_ConfigChannel(&AdcHandle, &sConfig);
28. 
29./* Configure ADC3 regular channel */
30.sConfig.Channel = ADC_CHANNEL_1;
31.sConfig.Rank = 2;
32.sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
33.sConfig.Offset = 0;
34. 
35.HAL_ADC_ConfigChannel(&AdcHandle, &sConfig);
36. 
37.HAL_ADC_Start_IT(&AdcHandle);

But ADC no interrupt is triggered.
Which register, which bit are involved in the configuration?

best regards
Max

Outcomes