cancel
Showing results for 
Search instead for 
Did you mean: 

Generate TRGO event for triggering ADC conversion of STM8S003K3

deepak2
Associate
Posted on December 16, 2015 at 20:38

Hi all,

I am working on sensing of my AC waveform (of 50 Hz) with ADC1 of STM8S003k3 MCU. There are three ways to trigger my ADC.

1) Through software means(internally)

2) TIM1 TRGO event

3) External Trigger ADC_ETR (PD.3) pin 

Firstly i have sampled my waveform through software means but i am getting sharp points at AC peaks.So i think to change sampling frequency using Timer TRGO event.

The TRGO signal is my OC1REF signal.When i observed my Timer Ouput(TRGO) on PC.1 pin,i am getting correct sampling freq set by me(10 Khz).

But on sampling the output through timer Interrupt,i am not getting any change in my waveform shape.

Please help me or provide me code snippet of TIM1 generating TRGO event to trigger ADC SOC.

Regards

Deepak

#trgo #adc-timer-debug #stm8s003
0 REPLIES 0