cancel
Showing results for 
Search instead for 
Did you mean: 

What woul be the best way to read ADC in an RTOS?

Riccardo Franceschetto
Associate III

I'd like to get ADC readings, implemented with DMA while running in an RTOS.

The problem is that the ADC with DMA interrupts the RTOS... don't know what could be the cause maybe interrupts conflicting?

2 REPLIES 2
Sarra.S
ST Employee

Hello @Riccardo Franceschetto​ 

I think you should configure the DMA controller to trigger an interrupt only when a buffer is completely filled! have you tried that?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Sarra,

I created a one element array, so the HAL_ADC_ConvCpltCallback get called every sample the adc feeds to the DMA.

Theoretically this should be a good implementation, but practically i think i'm stopping the GUI too frequently.