cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure a Timer to input capture from comparator?

BTrem.1
Senior II

Hi,

I have read the STM32F303RE reference manual along with using CubeMX 5.6.1 but can't seem to do what I want. The documentation of CubeMX is less than desirable IMHO.

As an aside I am already using TIM2_CH2 on pin PB3 in Input Capture Direct Mode and using this to generate a DMA request. This is working.

Now I want COMP7 to use DAC1_CH1 on the inv input and use pin PC1 on the non-inverting input. Then I want COMP7 output to go to TIM2_IC3.

I'm unclear how to set up TIM2_CH3 in this scenario. When I select Input Capture Direct Mode CubeMX automatically chooses pin PB10 as TIM2_Ch3. I don't want an external pin selected, I want the COMP7 output.

In CubeMX for TIM2 what do I choose as the mode for Ch3 ?

1 REPLY 1

The input from GPIO matrix is ORed with the comparator signal.

https://community.st.com/s/question/0D50X0000B9vdy2/in-f3-comparator-output-to-timer-input-channel-connects-exactly-where

If you don't set any pin to given channel, that input is probably 0, but that's not confirmed by ST,

I don't care how to do that in CubeMX, I don't use it.

JW