2016-12-13 12:44 AM
Hello,
How can I set up the Input Capture peripheral to be triggered by the Comparator event?
I've set COMP1[+] on PA1 and [-] from Vref. Without being sure I've configured the COMP1 trigger mode to event mode on both edges.
In the comparator's HAL file the comments mention that 'Comparators output to timers is set in timers instances', but I haven't been able to find a relevant option.
My goal is to measure the time between each voltage threshold edge on PA1 vs Vref.
Thanks in advance for any advice!
#stm32l011 #comparator #input-capture #cubemx2016-12-13 07:21 AM
Hi
Pikoulis.George
I have moved this post to the
where product related questions are posted.Thanks
Oli
2016-12-13 10:14 AM
Look into RM0377, the timers' chapters' registers subchapter contains (at its end) Option Registers (TIMx_OR) for individual timers. That's where the comparators' outputs can be redirected to timers' inputs.
I don't CubeMX, sorry.
JW
2016-12-13 11:17 PM
Thank you Oli!
I thought I had posted in the MCU forum but I was wrong.
2016-12-13 11:26 PM
Thank you Jan,
I'll test the remap bits and see what's happening!