cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically change pin configuration

KGaik.1
Associate II

I would like to change the pin configuration from GPIO Input to INPUT_CAPTURE_MODE_Channel in the code (dynamically).

How to achieve this ?

I'm using STM32F103CBT6.

Please Help. Thank you.

5 REPLIES 5
S.Ma
Principal

Yes you can and it is needless because pin level can be read anytime, while in alternate function too.

KGaik.1
Associate II

Could you please elaborate more about how to read pin status in input capture mode.

As I am new to the STM32, could you please explain it in more detail.

In exactly the same way as when it is set to GPIO input.

JW

Like I want to detect the frequency and also it should work GPIO input whenever I want, that's why I am searching for method to switch those functionalities or is it possible while the pin is in input capture mode.