2

According tot the datasheet, the ADC generates a DMA request at the end of each conversion:

enter image description here

Does the ADC use an interrupt to generate this DMA request? Or is it done in the background using hardware automatically? I am asking this today because in STM32CubeMX, you get to choose either the End of Conversion (EOC) or End of Sequence (EOS) interrupt. enter image description here enter image description here

I am wondering if choosing either EOC or EOS interrupt will have any effect on the ADC's ability to generate DMA requests.

Ken Lin
  • 986
  • 1
  • 8
  • 22
  • It doesn't use interrupt to generate DMA request. Interrupt flag is set and the DMA request is generated by the same signal, but other than that it's independent. – KIIV Nov 22 '18 at 21:37
  • To clarify this a bit more: ADC interrupt flag is set but it has no influence on your CPU core (if you haven't activated it). – A.R.C. Nov 23 '18 at 06:58
  • @KIIV When you say "Is generated by the same signal", which signal are you talking about? – Ken Lin Nov 23 '18 at 22:03
  • @A.R.C. So if I disable ADC interrupt, DMA requests will still be generated and served properly? – Ken Lin Nov 23 '18 at 22:04
  • @KenLin Signal like short digital impulse. – KIIV Nov 23 '18 at 22:34
  • @KIIV Just to be sure, a DMA request isn't generated in code or anything like that right? Like I can't go into the source code and find a function responsible for generating DMA request at the end of each ADC conversion? – Ken Lin Nov 23 '18 at 23:53
  • Whole point of the DMA is copying the data without using cpu. You just have to configure it properly. In theory, if you don't configure ADC to be free running or triggered by event from some timer, then yes, you have to start each conversion in code and the result will be transfered by DMA after it's finished. – KIIV Nov 24 '18 at 06:25
  • 1
    I see, so I don't need to worry about the short digital pulse that's used to generate DMA requests right? I just need to know that once everything is configured correctly, the ADC will handling generating a short digital pulse to send a DMA request automatically in the background. – Ken Lin Nov 24 '18 at 23:02

0 Answers0