"STM" Gpio pin configuration method

Source: Internet
Author: User
How to configure:

Normal GPIO Input: Configure the PIN as required for float input, with weak pull-up input, or with weak pull-down input, and do not enable all multiplexed function modules that can correspond to the pin

Normal GPIO output: Configure the PIN as required for push-pull output or open-drain output, and do not enable all multiplexed function modules that can correspond to the pin

Normal analog input: Configure the PIN to be analog input mode, and do not enable all the multiplexed function modules that the pin corresponds to

Input of the built-in peripherals: Configure the PIN as required to float the input, with a weak pull-up input or with a weak pull-down input, while enabling the pin corresponding to a function module

The output of the built-in peripherals: Configure the PIN as needed for multiplexed push-pull output or multiplexed open-drain outputs, while enabling all multiplexed function modules that can correspond to the pin

If there are multiple reusable function modules that correspond to the same pin, only one of them can be

Multiplexing Feature configuration:

For multiplexed function input, the port can be configured as any input mode or multiplexed function output mode

For multiplexed function outputs, the port must be configured as a multiplexed function output

For bidirectional multiplexing, the port must be configured to function as a multiplexed output

Precautions:

All IO ports have external interrupt capability and ports must be configured in input mode to use external interrupt function

The IO port is in the input float state after STM32 reset

When the JTAG pin is reset, it is in the pull-up or pull-down state

"STM" Gpio pin configuration method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.