2020-04-08 11:59 AM
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.
Solved! Go to Solution.
2020-04-08 12:10 PM
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.
2020-04-08 12:10 PM
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.
2020-04-08 12:19 PM
Thanks. I knew that was simple. At this point I'd forgotten the data sheet existed and was only looking in the reference manual.