cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine from which channel the capture took place?

Siragh ASUTP
Associate II
Posted on May 01, 2017 at 08:49

Hello.

I use stm32a4 and timer2 (channel 3 and channel 4) in capture mode.

How to determine from which channel the capture took place?
2 REPLIES 2
S.Ma
Principal
Posted on May 01, 2017 at 12:06

Have a look at the reference manual to find out in the status register the flag for each capture register which is set by hardware. Usually in a control register, there is an interrupt enable to trigger an ISR to process all captures/compares associated to a timer. Don t forget to clear the status flag quickly before the next event...

Posted on May 01, 2017 at 18:13

https://community.st.com/0D50X00009XkdeKSAR

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..