2018-09-10 04:27 AM
Can we avoid the ADC and DMA transfer interrupts and check a status of DMA transfer done for new values converted by ADC with multiple channels?
My MCU is : STM32L1
Solved! Go to Solution.
2018-09-10 04:35 AM
Yes, you could inspect the DMA TC or HT flags.
2018-09-10 04:35 AM
Yes, you could inspect the DMA TC or HT flags.
2018-09-10 04:56 AM
Hi is the Following code to do this OK?
Thanks
int adc_data_ready(void){
int ret;
ret = DmaHandle.DmaBaseAddress->ISR;
if(ret&DMA_FLAG_TC1){
__HAL_DMA_CLEAR_FLAG(DmaHandle,DMA_FLAG_TC1); /* Clear TC Flag */
ret = 1;
}else{
ret = 0;
}
return ret;
}
2018-09-10 08:36 AM
It might, check it and see.