2015-12-16 11:38 AM
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 event3) 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.RegardsDeepak #trgo #adc-timer-debug #stm8s003