cancel
Showing results for 
Search instead for 
Did you mean: 

Timing calculation of Adc intterupt

Hiren
Associate III

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​

1 REPLY 1
Cristian Gyorgy
Senior III

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.