2014-08-18 08:39 PM
I enabled ADC with DMA as such:
With the DMA continuous requests, the program will just loop in DMA1_Channel1_IRQHandler and the FreeRTOS thread will never run. Does anyone have any idea how to resolve this? I have already tried setting the NVIC configuration to level 3 for the DMA 1 Channel 1 global interrupt... Thanks! #stm32l0-adc-dma2015-07-13 09:43 AM
I have the same issue. Did you have any luck solving it?
2015-07-13 10:00 AM
Ok, well then you need to consider the conversion rate and quantity. If you do ONE sample, and it occurs every 30-40 machine cycles, the machine is going to saturate into and out of the interrupt handler.
So, a) pace the conversions at a realistic rate you can actually process them, b) do enough conversions before processing, thereby decimating the interrupt loading.The normal way to do this would be to have a large buffer which you can bisect in a ping/pong fashion with the DMA HT and TC interrupts providing the End-Of-Conversion signal for the block of samples. You'd configure a timer to trigger the conversions at a desired rate, say 44.1 KHz or whatever.If you just want the ADC+DMA to load data into a variable or array in the background, so that whenever you read the data it has the most current values, do you need to interrupt at all?