Skip to main content
HL?�t
Associate II
September 14, 2018
Question

ADC trigger conversion with timer

  • September 14, 2018
  • 0 replies
  • 758 views

Hi,

I have some trouble in implementing the trigger conversion for an ADC with a timer on an STM32F410CBU6 microcontroller. I'm using the HAL libraries and configured everything in CubeMX, but I never can trigger any measurement with my ADC.

I have three PWM channels (PWM Generation CHx) configured and a fourth channel as Output Compare No Ouput, which should trigger a measurement at half the period. The settings in CubeMX are shown in the attachment. I really don't know what else I can do to start a measurement.

I initialize the timer like this:

HAL_TIM_PWM_Start(tim5,TIM_CHANNEL_1);
HAL_TIM_PWM_Start(tim5,TIM_CHANNEL_2);
HAL_TIM_PWM_Start(tim5,TIM_CHANNEL_3);
HAL_TIM_OC_Start(tim5,TIM_CHANNEL_4);

An the ADC is started like this:

HAL_ADCEx_MultiModeStart_DMA(adc1, (uint32_t*)adc_buffer, ADC_BUFFER_SIZE);

Any one an idea what I'm doing wrong here?

This topic has been closed for replies.