cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous multiple ADC conversion and transfer by DMA implementation without any interrupts?

ADIt
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

Yes, you could inspect the DMA TC or HT flags.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

Yes, you could inspect the DMA TC or HT flags.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ADIt
Associate II

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;

}

It might, check it and see.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..