cancel
Showing results for 
Search instead for 
Did you mean: 

ADC of STM32H753 with external trigger stops after first conversion sequence

AWies.1
Associate III

I am trying to trigger conversion sequence on the ADC of an STM32H753 using the CC1 output of a timer. My goal is to start a conversion sequence every 25µs. I know that frequency of the CC1 output is correct; I am counting the events with an interrupt. However, on the ADC only a single sequence is triggered. According to the reference manual (RM0433), figure 160, when setting EXTEN to 01 and CONT to 0, then each trigger event should start a conversion sequence. But is isn't.

Here is the code CubeMX generated for initializing the ADC. How do I get this to work?

 hadc3.Instance = ADC3;

 hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV6;

 hadc3.Init.Resolution = ADC_RESOLUTION_16B;

 hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE;

 hadc3.Init.EOCSelection = ADC_EOC_SEQ_CONV;

 hadc3.Init.LowPowerAutoWait = DISABLE;

 hadc3.Init.ContinuousConvMode = ENABLE;

 hadc3.Init.NbrOfConversion = 11;

 hadc3.Init.DiscontinuousConvMode = DISABLE;

 hadc3.Init.ExternalTrigConv = ADC_EXTERNALTRIG_T1_CC3;

 hadc3.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_RISING;

 hadc3.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;

 hadc3.Init.Overrun = ADC_OVR_DATA_PRESERVED;

 hadc3.Init.LeftBitShift = ADC_LEFTBITSHIFT_NONE;

 hadc3.Init.OversamplingMode = DISABLE;

ADC clock is 24MHz...

1 ACCEPTED SOLUTION

Accepted Solutions
AWies.1
Associate III

Never mind, the timer output just was set up wrongly. Never toggled...

View solution in original post

2 REPLIES 2
AWies.1
Associate III

Ooops. One line should read

hadc3.Init.ContinuousConvMode = DISABLE;

I only can somewhat get it to do something if I set the continuous conversion mode to ENABLE. But that is not what I want...

AWies.1
Associate III

Never mind, the timer output just was set up wrongly. Never toggled...