STM32 Series MCU IO port mode setting

Source: Internet
Author: User

Each set of IO ports of the STM32 microcontroller has 4 32-bit configuration registers for configuring the Gpiox_moder, Gpiox_otyper, Gpiox_ospeedr, and gpiox_pupdr,2 32-bit data registers for configuring input and output registers Gpiox_ IDR and gpiox_odr,1 32-bit reset registers gpiox_bsrr,1 32-bit lock registers Gpiox_lckr and 2 32-bit multiplexing features select registers Gpiox_afrh and GPIOX_AFRL.

The output status of the Gpio can be configured as push-pull or open-drain plus pull-up or pull-down. The output data can either come from the output data register or be emitted by other peripheral registers. The speed of each set of IO ports is configurable and can be configured as 25mhz,50mhz or 100Mhz. Data input also has several modes, which are floating, up and down, and simulated, and the input data can also be configured to come from the input register or other peripheral registers. The Reset register makes it easy to configure each one individually, which is useful in many cases.

After a description of the Gpio mode, here is a summary of its mode of operation, it has a total of eight combinations, that is, there are eight kinds of configurable mode of operation, namely:

  1. Enter floating space
  2. Input pull-up
  3. Input drop-down
  4. Simulation
  5. Open-drain output with pull-up or pull-down
  6. Push-pull output with pull-up or pull-down
  7. Multiplexing function push-pull with pull-up or pull-down
  8. Multiplexing function with pull-up or pull-down open-drain

STM32 Series MCU IO port mode setting

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.