cancel
Showing results for 
Search instead for 
Did you mean: 

How to know which GPIO Pin to use for Timer Input Capture?

SWill.11
Associate II

If I'm using a timer in input capture mode, how do I know which pins it wants to use for channels 1 and 2? I've been through the manual a bunch of times, looked for examples and other posts etc, I can't find the answer to this seemingly simple question.

For example, I'm struggling to get TIM1 in input capture mode to work. One channel is set to rising edge, the other set to falling, etc. CubeMX suggests that TIM1 wants to use PC0 for Channel 1 (STM32F303), but I have no idea why it's that pin, and since I can't get any change on the pin to trigger a capture event, but the timer otherwise seems like it's working, I'm skeptical it's the correct pin.

1 ACCEPTED SOLUTION

Accepted Solutions
berendi
Principal

Check the pin mapping table in the datasheet, and the description of the GPIO MODER and AFRL/AFRH registers in the reference manual.​

Check the schematics of your board​ to see if there is something connected to the pin.

View solution in original post

2 REPLIES 2
berendi
Principal

Check the pin mapping table in the datasheet, and the description of the GPIO MODER and AFRL/AFRH registers in the reference manual.​

Check the schematics of your board​ to see if there is something connected to the pin.

Thanks. I knew that was simple. At this point I'd forgotten the data sheet existed and was only looking in the reference manual.