2020-09-21 12:23 AM
Hi all,
I want to use timer 2 to trigger ADC function (ADC3) on STM32H743ZI2 platform.
After DMA & timer starting, I stuck in HAL_ADC_IRQHandler().
/* Multimode not set or feature not available or ADC independent */
if ((hadc->Instance->CFGR & ADC_CFGR_DMNGT) != 0UL)
{
overrun_error = 1UL;
}
Can somebody help me what's going on?
The attached file is cubeMx setting & main file.
Thanks.
2020-09-21 06:46 AM
> hadc3.Init.ContinuousConvMode = ENABLE;
> sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5;
Once it triggers once, the ADC will continue to free-run. If you want one conversion per timer update, disable ContinuousConvMode .
At a sampling time of 1.5 cycles, maybe the DMA can't keep up and you get an overrun. Bump this up to max unless you have a reason not to.
2020-09-23 03:18 AM
Hi TDK,
I found a workaround in https://electronics.stackexchange.com/questions/408907/stm32-adcdma-occurring-only-once.
But I don't know the actual reason.
2020-09-25 01:30 AM
The root cause of this issue is DMA cannot access DTCM.