{"id":2289,"date":"2019-07-02T09:30:19","date_gmt":"2019-07-02T09:30:19","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=2289"},"modified":"2023-08-30T17:17:27","modified_gmt":"2023-08-30T11:47:27","slug":"gpio-input-mode-pull-pull-state","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/","title":{"rendered":"STM32 GPIO Lecture 4 : GPIO input mode with pull-up \/pull-down state"},"content":{"rendered":"<div class=\"boldgrid-section color4-background-color color-4-text-contrast bg-background-color\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 50px; padding-bottom: 50px;\">\n<div class=\"col-md-11 col-sm-12 col-xs-12 col-lg-11\">\n<h2 class=\"\">&nbsp;<\/h2>\n<h1 class=\"\" style=\"text-align: center;\"><span style=\"color: #000080;\">GPIO input mode with pull-up \/pull-down state<\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\">\n<div class=\"col-md-12 col-xs-12 col-sm-12 col-lg-12\">\n<hr>\n<\/div>\n<\/div>\n<div id='gallery-1' class='gallery galleryid-2289 gallery-columns-2 gallery-size-medium'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/fastbitlab.com\/blog\/gpio-input-mode-high-impedance-state\/screenshot-98\/'><img fetchpriority=\"high\" decoding=\"async\" width=\"300\" height=\"216\" src=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-300x216.png\" class=\"attachment-medium size-medium\" alt=\"GPIO input mode with pull-up Resistor.\" aria-describedby=\"gallery-1-2235\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-300x216.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-600x431.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-120x86.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-500x359.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-200x144.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98-400x287.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png 632w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-2235'>\n\t\t\t\tFigure1.GPIO input mode with pull-up Resistor.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/fastbitlab.com\/blog\/gpio-input-mode-high-impedance-state\/screenshot-99\/'><img decoding=\"async\" width=\"300\" height=\"210\" src=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-300x210.png\" class=\"attachment-medium size-medium\" alt=\"GPIO input mode with Pull-down resistor\" aria-describedby=\"gallery-1-2236\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-300x210.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-600x420.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-120x84.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-500x350.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-200x140.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99-400x280.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-99.png 604w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-2236'>\n\t\t\t\tFigure2. GPIO input mode with Pull-down resistor\n\t\t\t\t<\/figcaption><\/figure>\n\t\t<\/div>\n\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">Let&#8217;s understand the <a class=\"\" href=\"http:\/\/fastbitlab.com\/stm32-gpio-lecture-1-gpio-pin-ports\/\" target=\"_blank\" rel=\"noopener\">GPIO pin<\/a> in input mode with external or internal pull-up\/pull-down resistor connected, as shown in Figure 1 and Figure 2.<\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">It&#8217;s a simple circuit in which the floating state is avoided by introducing or activating internal pull-up \/pull-down resistor. <\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">In Figure 1 internal pull-up resistor is enabled, which drives pin to high voltage. <\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">In Figure 2 internal pull-down resistor is activated, which drives pin to the ground.<\/span><\/p>\n<ul class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li><span style=\"color: #000000;\"><strong>Pull-up Resistor<\/strong>: A pull-up resistor connects the GPIO pin to the supply voltage (Vcc or +5V) through a resistor. This ensures that when the external signal is disconnected or high impedance, the pin is pulled to a logic high state. When the external signal connects to ground, it can override the pull-up and pull the pin to a logic low state.<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>Pull-down Resistor<\/strong>: Conversely, a pull-down resistor connects the GPIO pin to ground (GND) through a resistor. In this case, when the external signal is disconnected, the pin is pulled to a logic low state. When the external signal connects to the supply voltage, it can override the pull-down and pull the pin to a logic high state.<\/span><\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 20px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #ff0000;\"><strong>How to activate the internal pull-up\/pull-down resistor?<\/strong><\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">There is configuration resistor for every <a class=\"\" href=\"http:\/\/fastbitlab.com\/stm32-gpio-lecture-1-gpio-pin-ports\/\" target=\"_blank\" rel=\"noopener\">GPIO port<\/a>&nbsp;which enables us to handle internal pull-up \/pull-down resistor. GPIO configuration resistors are GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR, and GPIOx_PUPDR.<\/span><\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">Please note that it&#8217;s always safe to keep unused GPIO pins in one of the states. So, the remaining GPIO pins are reluctant to voltage fluctuations which may lead to the leakage of the current.<\/span><\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">Many microcontrollers supply internal pull-up\/pull-down configuration options. Sometimes, a specific pull-up\/pull-down resistor value required which necessitates using an external pull-up\/pull-down instead of a chip&#8217;s internal pull-up\/pull-down.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 20px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses,<\/b><\/span><\/p>\n<p class=\"\" style=\"font-size: 17px;\"><span style=\"color: #000000;\">Click here:&nbsp;<\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\">https:\/\/fastbitlab.com\/course1<\/a><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; GPIO input mode with pull-up \/pull-down state &nbsp; Let&#8217;s understand the GPIO pin in input mode with external or internal pull-up\/pull-down resistor connected, as shown in Figure 1 and Figure 2. It&#8217;s a simple circuit in which the floating state is avoided by introducing or activating internal pull-up \/pull-down resistor. In Figure 1 internal [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2235,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[20],"class_list":["post-2289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-stm32-gpio","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GPIO input mode with pull-up\/pull-down state | STM32 GPIO<\/title>\n<meta name=\"description\" content=\"GPIO input mode with pull-up\/pull-down state. Let\u2019s understand GPIO pin in input mode with external or internal pull up \/pull down resistor\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GPIO input mode with pull-up\/pull-down state | STM32 GPIO\" \/>\n<meta property=\"og:description\" content=\"GPIO input mode with pull-up\/pull-down state. Let\u2019s understand GPIO pin in input mode with external or internal pull up \/pull down resistor\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-02T09:30:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-30T11:47:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png\" \/>\n\t<meta property=\"og:image:width\" content=\"632\" \/>\n\t<meta property=\"og:image:height\" content=\"454\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"STM32 GPIO Lecture 4 : GPIO input mode with pull-up \\\/pull-down state\",\"datePublished\":\"2019-07-02T09:30:19+00:00\",\"dateModified\":\"2023-08-30T11:47:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/\"},\"wordCount\":331,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/Screenshot-98.png\",\"keywords\":[\"STM32 GPIO Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/\",\"name\":\"GPIO input mode with pull-up\\\/pull-down state | STM32 GPIO\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/Screenshot-98.png\",\"datePublished\":\"2019-07-02T09:30:19+00:00\",\"dateModified\":\"2023-08-30T11:47:27+00:00\",\"description\":\"GPIO input mode with pull-up\\\/pull-down state. Let\u2019s understand GPIO pin in input mode with external or internal pull up \\\/pull down resistor\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/Screenshot-98.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/Screenshot-98.png\",\"width\":632,\"height\":454,\"caption\":\"Figure1.GPIO input mode with pull-up Resistor.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/gpio-input-mode-pull-pull-state\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32 GPIO Lecture 4 : GPIO input mode with pull-up \\\/pull-down state\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GPIO input mode with pull-up\/pull-down state | STM32 GPIO","description":"GPIO input mode with pull-up\/pull-down state. Let\u2019s understand GPIO pin in input mode with external or internal pull up \/pull down resistor","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/","og_locale":"en_US","og_type":"article","og_title":"GPIO input mode with pull-up\/pull-down state | STM32 GPIO","og_description":"GPIO input mode with pull-up\/pull-down state. Let\u2019s understand GPIO pin in input mode with external or internal pull up \/pull down resistor","og_url":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2019-07-02T09:30:19+00:00","article_modified_time":"2023-08-30T11:47:27+00:00","og_image":[{"width":632,"height":454,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"STM32 GPIO Lecture 4 : GPIO input mode with pull-up \/pull-down state","datePublished":"2019-07-02T09:30:19+00:00","dateModified":"2023-08-30T11:47:27+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/"},"wordCount":331,"commentCount":2,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png","keywords":["STM32 GPIO Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/","url":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/","name":"GPIO input mode with pull-up\/pull-down state | STM32 GPIO","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png","datePublished":"2019-07-02T09:30:19+00:00","dateModified":"2023-08-30T11:47:27+00:00","description":"GPIO input mode with pull-up\/pull-down state. Let\u2019s understand GPIO pin in input mode with external or internal pull up \/pull down resistor","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2019\/07\/Screenshot-98.png","width":632,"height":454,"caption":"Figure1.GPIO input mode with pull-up Resistor."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/gpio-input-mode-pull-pull-state\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"STM32 GPIO Lecture 4 : GPIO input mode with pull-up \/pull-down state"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/2289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=2289"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/2289\/revisions"}],"predecessor-version":[{"id":15681,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/2289\/revisions\/15681"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/2235"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=2289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=2289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=2289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}