Skip to main content
ADIt
Associate II
September 10, 2018
Solved

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

  • September 10, 2018
  • 3 replies
  • 982 views

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

This topic has been closed for replies.
Best answer by Tesla DeLorean

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

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
September 10, 2018

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
ADIt
ADItAuthor
Associate II
September 10, 2018

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;

}

Tesla DeLorean
Guru
September 10, 2018

It might, check it and see.

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