cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431 Comparator output to Timer

STere.1719
Associate II

Hello.

STM32G431CBT6

Is it possible to route the output from the comparator to the input of the Timer input? The reference manual says that this is possible, but there is no description. And in the comparator register there are no options for choosing where to send the output.
Previously, I used stm32f072, and in the comparator settings there is an "OUTSEL"  bit field where you can select where the output will be connected.

I need to measure the signal period (timer in "input capture" mode). 

1 ACCEPTED SOLUTION

Accepted Solutions

In 'G4, the interconnection from comparators to timers is extensive.

For interconnection into the individual channels, see description of TIMx_TISEL register(s) and the links to the input matrix tables from there.

JW

View solution in original post

2 REPLIES 2

In 'G4, the interconnection from comparators to timers is extensive.

For interconnection into the individual channels, see description of TIMx_TISEL register(s) and the links to the input matrix tables from there.

JW

MM..1
Chief II

I extend question here. When i set comparator out to timer capture and plan measure time on failing edges , result is problem. Tim generate event too on signal from comparator out rising. On scope zoom i see some very short pulses at the comparator level changes. Hysteresis is set to medium, but problem persist. 

Result is comparators unusable in MCU offload and require some IRQ control for this short pulse ignore.

Tested with internal reference or DAC out = same results.