AnsweredAssumed Answered

ADC+DMA Start with Timer delay -Help needed!-

Question asked by salehi.arsalan on May 13, 2014
Latest reply on May 15, 2014 by salehi.arsalan
hello All,
i want to start an ADC with DMA in a timer(5) interrupt routine. when i test timer and adc  individually they work right. but when i insert ADC start, in timer isr the timer and adc works once and then timer stays in the isr and adc does not start again. can anyone help me please? my code is looks like below.
Thanks

void
 TIM5_IRQHandler(void)  //Start ADC after delay
{
    HAL_NVIC_ClearPendingIRQ(TIM5_IRQn);
    HAL_TIM_IRQHandler(&htim5);
    HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_10);
    HAL_ADC_Start_DMA((&hadc1) ,(uint32_t*)&uhADCxConvertedValue, 1000);
}
 
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* AdcHandle)
{
    HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_11);
    HAL_ADC_Stop_DMA(&hadc1);
}

Outcomes