Skip to main content
Graduate
March 31, 2023
Question

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

  • March 31, 2023
  • 1 reply
  • 1105 views

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?

    This topic has been closed for replies.

    1 reply

    ST Employee
    March 31, 2023

    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?

    Graduate
    April 3, 2023

    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.