Skip to main content
Hiren
Associate II
June 26, 2019
Question

Timing calculation of Adc intterupt

  • June 26, 2019
  • 1 reply
  • 1492 views

Hello sir

I am use stm8s​ for measuring voltage rms

So i use adc but how to calculate when adc interrupt are coming

I Aattched initiation code in this post​

​i try to calculate adc interrupt time but when i measure it is wrong

Plz provide guidance how to calculate adc interrupt time​

This topic has been closed for replies.

1 reply

Cristian Gyorgy
Associate II
July 7, 2019

Hello Hiren.thumar!

I don't know the code you use, but I see something in your initialization function for the ADC that an external trigger on timer is setup.

What you need to do, is understand what the initialization function does - so please read the documentation for it, or just search that function in your libraries and see exactly what it does.

The ADC conversion timing for the STM8 is very deterministic, so if you know how your ADC is setup, you also know when to expect a conversion complete interrupt.