Skip to main content
KGaik.1
Associate II
September 5, 2022
Question

Dynamically change pin configuration

  • September 5, 2022
  • 3 replies
  • 1476 views

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.

This topic has been closed for replies.

3 replies

S.Ma
Principal
September 5, 2022

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

KGaik.1
KGaik.1Author
Associate II
September 5, 2022

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

KGaik.1
KGaik.1Author
Associate II
September 5, 2022

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

waclawek.jan
Super User
September 5, 2022

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

JW