{"id":4263,"date":"2020-06-02T19:46:43","date_gmt":"2020-06-02T17:46:43","guid":{"rendered":"https:\/\/deepbluembedded.com\/?p=4263"},"modified":"2024-01-21T01:07:44","modified_gmt":"2024-01-20T23:07:44","slug":"stm32-hal-library-tutorial-examples","status":"publish","type":"post","link":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/","title":{"rendered":"STM32 HAL Library Tutorial"},"content":{"rendered":"<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"background-color: #ffffff; width: 5%;\"><a href=\"https:\/\/deepbluembedded.com\/getting-started-with-stm32-arm-cortex-mcus\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1666 alignleft\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-150x150.png\" alt=\"Previous Tutorial\" width=\"35\" height=\"35\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-150x150.png 150w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-160x160.png 160w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-320x320.png 320w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-50x50.png 50w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L.png 256w\" sizes=\"auto, (max-width: 35px) 100vw, 35px\" \/><\/a><\/td>\n<td style=\"background-color: #ffffff; width: 30%; text-align: left;\" colspan=\"2\"><a href=\"https:\/\/deepbluembedded.com\/getting-started-with-stm32-arm-cortex-mcus\/\"><strong>Previous Tutorial<\/strong><\/a><\/td>\n<td style=\"background-color: #ffffff; width: 30%; text-align: center;\" colspan=\"2\"><span style=\"color: #000000;\"><strong><span style=\"font-size: 14pt;\">Tutorial 2<\/span><\/strong><\/span><\/td>\n<td style=\"background-color: #ffffff; width: 30%; text-align: right;\" colspan=\"2\"><a href=\"https:\/\/deepbluembedded.com\/stm32-gpio-tutorial\/\"><strong>Next Tutorial<\/strong><\/a><\/td>\n<td style=\"background-color: #ffffff; width: 5%;\"><a href=\"https:\/\/deepbluembedded.com\/stm32-gpio-tutorial\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1667 alignright\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-150x150.png\" alt=\"Next Tutorial\" width=\"35\" height=\"35\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-150x150.png 150w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-160x160.png 160w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-320x320.png 320w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-50x50.png 50w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256.png 256w\" sizes=\"auto, (max-width: 35px) 100vw, 35px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #ffffff; width: 5%;\"><\/td>\n<td style=\"background-color: #ffffff; text-align: center;\" colspan=\"6\"><span style=\"font-size: 14pt;\"><strong>STM32 HAL Library<\/strong><\/span><\/td>\n<td style=\"background-color: #ffffff; width: 5%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #ffffff; width: 5%;\"><\/td>\n<td style=\"width: 20%; background-color: #ffffff; text-align: center;\" colspan=\"6\"><a href=\"https:\/\/deepbluembedded.com\/stm32-arm-programming-tutorials\/#_STM32_Course_Table_OF_Contents\"><span style=\"font-size: 10pt;\"><strong>STM32 Course Home Page <\/strong><\/span>????<\/a><\/td>\n<td style=\"background-color: #ffffff; width: 5%;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4265\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/54928769-ba986300-4f14-11e9-91d7-ecc6640d1989.png\" alt=\"STM32 CubeMX Tutorials And Examples\" width=\"200\" height=\"198\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/54928769-ba986300-4f14-11e9-91d7-ecc6640d1989.png 365w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/54928769-ba986300-4f14-11e9-91d7-ecc6640d1989-300x297.png 300w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/54928769-ba986300-4f14-11e9-91d7-ecc6640d1989-150x150.png 150w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/54928769-ba986300-4f14-11e9-91d7-ecc6640d1989-100x100.png 100w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/54928769-ba986300-4f14-11e9-91d7-ecc6640d1989-50x50.png 50w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\"> STMCube<sup>\u00ae<\/sup> is STMicroelectronics&#8217;s original initiative to ease and accelerate the development cycle of embedded products. STM32Cube covers the STM32 portfolio of microcontrollers.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">It provides the developer with all the low-level drivers, APIs, and enables him\/her to dedicate most of the effort to develop the application layer and any required middleware.<\/span><\/p>\n<hr \/>\n<h3 style=\"text-align: left;\"><span style=\"background-color: #333333;\"><strong><span style=\"color: #ffffff;\">\u00a0 \u00a0STM32 HAL Library Drivers<\/span><\/strong><strong><span style=\"color: #ffffff;\">\u00a0 \u00a0<\/span><\/strong><\/span><\/h3>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\"> The STM32CubeMX, a graphical software configuration tool that allows generating C initialization code using graphical wizards.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\"> The STM32Cube Hardware Abstraction Layer (HAL), an STM32 abstraction layer embedded software ensuring maximized portability across the STM32 microcontroller. The HAL is available for all the hardware peripherals.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\"> The low-layer APIs (LL) offering a fast light-weight expert-oriented layer that is closer to the hardware than the HAL. The LL APIs are available only for a set of peripherals.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\"> The HAL and LL are complementary and cover a wide range of applications requirements:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">The HAL offers high-level and feature-oriented APIs, with a high-portability level. They hide the MCU and peripheral complexity to end-user.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">The LL offers low-level APIs at registers level, with better optimization but less portability. They require deep knowledge of the MCU and peripherals specifications.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"color: #000000;\"> The source code of HAL and LL drivers is developed in Strict ANSI-C which makes it independent from the development tools. It is fully documented and is MISRA-C 2004 compliant.<\/span><\/span><\/p>\n<hr \/>\n<h3 style=\"text-align: left;\"><span style=\"background-color: #333333;\"><strong><span style=\"color: #ffffff;\">\u00a0 \u00a0STM32 HAL Drivers Examples\u00a0 \u00a0<\/span><\/strong><\/span><\/h3>\n<p><strong>HAL GPIO APIs<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4270\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-GPIO.png\" alt=\"STM32 HAL GPIO\" width=\"399\" height=\"220\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-GPIO.png 566w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-GPIO-300x165.png 300w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/p>\n<p><strong>HAL Detailed Function Description<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4271\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/HAL-GPIO-Detailed-Function-Description.png\" alt=\"HAL GPIO Detailed Function Description\" width=\"600\" height=\"229\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/HAL-GPIO-Detailed-Function-Description.png 739w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/HAL-GPIO-Detailed-Function-Description-300x114.png 300w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/HAL-GPIO-Detailed-Function-Description-600x229.png 600w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">In the same manner, there are low-level hardware drivers for almost all the hardware peripherals in the STM32 microcontrollers. Including Timers, ADC, USART, I2C, USB, DAC, Comparators, etc.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">We&#8217;ll configure these peripherals and generate the initialization C-Code using the CubeMX software tool. Here is a screenshot for what it looks like inside the interface where we configure the timer module for example.<\/span><\/p>\n<p><strong>Hardware Timer Module Configuration Within CubeMX<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4272\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Timer-Config-Using-CubeMX.png\" alt=\"STM32 HAL Timer Config Using CubeMX\" width=\"993\" height=\"593\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Timer-Config-Using-CubeMX.png 993w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Timer-Config-Using-CubeMX-300x179.png 300w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Timer-Config-Using-CubeMX-768x459.png 768w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Timer-Config-Using-CubeMX-600x358.png 600w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h3 style=\"text-align: left;\"><span style=\"background-color: #333333;\"><strong><span style=\"color: #ffffff;\">\u00a0 \u00a0STM32 HAL Concluding Remarks\u00a0 \u00a0<\/span><\/strong><\/span><\/h3>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">Using the STM32 HAL device drivers can be advantageous in so many situations, and help shorten the development time. Especially for projects that fall in the category of &#8220;proof of concept&#8221;. I think no one wants to spend so much time building a complete software stack for a specific target then it proves the main idea needs more refinement or the target itself does not perform well enough.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">However, the moderately high-level APIs provided by the HAL may have extra more features than what you may actually need in some situations. So you end up using more memory space and executing some tasks a little bit slower due to the overhead of the functionalities embedded in the libraries.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">You can use the LL drivers and optimize more at the register level in order to enhance memory utilization or the speed of execution. However, the application at the end would not be easily portable across multiple targets.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">All in all, we&#8217;ll be using the STM32 CubeMX tool to generate HAL + LL drivers C-Code to initialize our hardware. Then we&#8217;ll be developing the application layer and some middleware stuff on the way.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5617\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture.png\" alt=\"STM32 Embedded Software Layered Architecture\" width=\"2278\" height=\"855\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture.png 2278w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture-300x113.png 300w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture-1024x384.png 1024w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture-768x288.png 768w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture-1536x577.png 1536w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Embedded-Software-Layered-Architecture-2048x769.png 2048w\" sizes=\"auto, (max-width: 2278px) 100vw, 2278px\" \/><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">Mostly, we&#8217;ll be focusing on the ECUAL layer building some firmware drivers, and testing them in different applications. Those drivers must be easily reconfigurable and completely portable. <\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">To achieve reconfigurability, we&#8217;ll use something called &#8220;Linking Configuration&#8221; that you&#8217;ll learn in the next tutorials. And in order to achieve the portability requirement, the drivers will be totally based on the STM&#8217;s HAL + LL drivers that have uniformed APIs across all STM32 microcontrollers. In this way, you can use the code provided in the practical LABs in this series of tutorials and build it to your specific target microcontroller whatever it is, it should work!<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">ECUAL drivers we&#8217;ll be building include: [ <a href=\"https:\/\/deepbluembedded.com\/stm32-servo-motor-control-with-pwm-servo-library-examples-code\/\" target=\"_blank\" rel=\"noopener\">Servo Motors<\/a> &#8211; <a href=\"https:\/\/deepbluembedded.com\/stm32-keypad-interfacing-library\/\" target=\"_blank\" rel=\"noopener\">Keypad<\/a> &#8211; <a href=\"https:\/\/deepbluembedded.com\/stm32-lcd-16x2-tutorial-library-alphanumeric-lcd-16x2-interfacing\/\" target=\"_blank\" rel=\"noopener\">LCD<\/a> &#8211; <a href=\"https:\/\/deepbluembedded.com\/stm32-ultrasonic-sensor-input-capture-library\/\" target=\"_blank\" rel=\"noopener\">HC-SR04 Ultrasonic<\/a> &#8211; <a href=\"https:\/\/deepbluembedded.com\/stm32-joystick-library-driver-examples\/\" target=\"_blank\" rel=\"noopener\">Joystick<\/a> &#8211; and more.. ]. You can check them out if you&#8217;re curious or just keep following along with these tutorials.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; color: #000000;\">That&#8217;s it for this short introduction to the STM32 HAL Library and CubeMX tool. In the next tutorial, we&#8217;ll get to know the hardware GPIO ports and pins. How it works and the internal circuitry and functionalities you can configure in various applications. Thereafter we&#8217;ll be able to start the first LAB in this series of tutorials and &#8220;Blink an LED!&#8221;.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"background-color: #ffffff; width: 5%;\"><a href=\"https:\/\/deepbluembedded.com\/getting-started-with-stm32-arm-cortex-mcus\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1666 alignleft\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-150x150.png\" alt=\"Previous Tutorial\" width=\"35\" height=\"35\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-150x150.png 150w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-160x160.png 160w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-320x320.png 320w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L-50x50.png 50w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256L.png 256w\" sizes=\"auto, (max-width: 35px) 100vw, 35px\" \/><\/a><\/td>\n<td style=\"background-color: #ffffff; width: 30%; text-align: left;\" colspan=\"2\"><a href=\"https:\/\/deepbluembedded.com\/getting-started-with-stm32-arm-cortex-mcus\/\"><strong>Previous Tutorial<\/strong><\/a><\/td>\n<td style=\"background-color: #ffffff; width: 30%; text-align: center;\" colspan=\"2\"><span style=\"color: #000000;\"><strong><span style=\"font-size: 14pt;\">Tutorial 2<\/span><\/strong><\/span><\/td>\n<td style=\"background-color: #ffffff; width: 30%; text-align: right;\" colspan=\"2\"><a href=\"https:\/\/deepbluembedded.com\/stm32-gpio-tutorial\/\"><strong>Next Tutorial<\/strong><\/a><\/td>\n<td style=\"background-color: #ffffff; width: 5%;\"><a href=\"https:\/\/deepbluembedded.com\/stm32-gpio-tutorial\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1667 alignright\" src=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-150x150.png\" alt=\"Next Tutorial\" width=\"35\" height=\"35\" srcset=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-150x150.png 150w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-160x160.png 160w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-320x320.png 320w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256-50x50.png 50w, https:\/\/deepbluembedded.com\/wp-content\/uploads\/2018\/06\/play-256.png 256w\" sizes=\"auto, (max-width: 35px) 100vw, 35px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p> &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"STM32 HAL Library Tutorial\" class=\"read-more button\" href=\"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#more-4263\" aria-label=\"Read more about STM32 HAL Library Tutorial\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":4268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28,30,103],"tags":[308],"class_list":["post-4263","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-embedded-systems","category-embedded-tutorials","category-stm32-arm","tag-stm32-core","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>STM32 HAL Library Tutorial &#8211; HAL Library Examples - DeepBlue<\/title>\n<meta name=\"description\" content=\"STM32 HAL Library Tutorial. HAL Library Examples. Documentation and explanation. STM32 CubeMX tutorial and getting started with.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STM32 HAL Library Tutorial &#8211; HAL Library Examples - DeepBlue\" \/>\n<meta property=\"og:description\" content=\"STM32 HAL Library Tutorial. HAL Library Examples. Documentation and explanation. STM32 CubeMX tutorial and getting started with.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"DeepBlue\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/khaled.elrawy.359\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/khaled.elrawy.359\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-02T17:46:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-20T23:07:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"340\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Khaled Magdy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Khaled Magdy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/\"},\"author\":{\"name\":\"Khaled Magdy\",\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/#\\\/schema\\\/person\\\/30259d66cf68c6c681562dbe551b7867\"},\"headline\":\"STM32 HAL Library Tutorial\",\"datePublished\":\"2020-06-02T17:46:43+00:00\",\"dateModified\":\"2024-01-20T23:07:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/\"},\"wordCount\":734,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/#\\\/schema\\\/person\\\/30259d66cf68c6c681562dbe551b7867\"},\"image\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/deepbluembedded.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/STM32-HAL-Library.jpg\",\"keywords\":[\"STM32 Core\"],\"articleSection\":[\"Embedded Systems\",\"Embedded Tutorials\",\"STM32 ARM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/\",\"url\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/\",\"name\":\"STM32 HAL Library Tutorial &#8211; HAL Library Examples - DeepBlue\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/deepbluembedded.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/STM32-HAL-Library.jpg\",\"datePublished\":\"2020-06-02T17:46:43+00:00\",\"dateModified\":\"2024-01-20T23:07:44+00:00\",\"description\":\"STM32 HAL Library Tutorial. HAL Library Examples. Documentation and explanation. STM32 CubeMX tutorial and getting started with.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#primaryimage\",\"url\":\"https:\\\/\\\/deepbluembedded.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/STM32-HAL-Library.jpg\",\"contentUrl\":\"https:\\\/\\\/deepbluembedded.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/STM32-HAL-Library.jpg\",\"width\":720,\"height\":340,\"caption\":\"STM32 HAL Library\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/stm32-hal-library-tutorial-examples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/deepbluembedded.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32 HAL Library Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/#website\",\"url\":\"https:\\\/\\\/deepbluembedded.com\\\/\",\"name\":\"DeepBlueMbedded\",\"description\":\"Embedded Systems And Computer Engineering Tutorials &amp; Articles\",\"publisher\":{\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/#\\\/schema\\\/person\\\/30259d66cf68c6c681562dbe551b7867\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/deepbluembedded.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/deepbluembedded.com\\\/#\\\/schema\\\/person\\\/30259d66cf68c6c681562dbe551b7867\",\"name\":\"Khaled Magdy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g\",\"caption\":\"Khaled Magdy\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g\"},\"description\":\"Principal Embedded Systems Engineer with years of experience in embedded software and hardware design. I work in the Automotive &amp; e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI\\\/ML, and other fields I'm passionate about. I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?\",\"sameAs\":[\"https:\\\/\\\/deepbluembedded.com\",\"https:\\\/\\\/www.facebook.com\\\/khaled.elrawy.359\\\/\",\"https:\\\/\\\/www.instagram.com\\\/deepbluembedded\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/khaled-magdy-\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCzLSrNZD4rCjSCOVU9hknvA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STM32 HAL Library Tutorial &#8211; HAL Library Examples - DeepBlue","description":"STM32 HAL Library Tutorial. HAL Library Examples. Documentation and explanation. STM32 CubeMX tutorial and getting started with.","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:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/","og_locale":"en_US","og_type":"article","og_title":"STM32 HAL Library Tutorial &#8211; HAL Library Examples - DeepBlue","og_description":"STM32 HAL Library Tutorial. HAL Library Examples. Documentation and explanation. STM32 CubeMX tutorial and getting started with.","og_url":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/","og_site_name":"DeepBlue","article_publisher":"https:\/\/www.facebook.com\/khaled.elrawy.359\/","article_author":"https:\/\/www.facebook.com\/khaled.elrawy.359\/","article_published_time":"2020-06-02T17:46:43+00:00","article_modified_time":"2024-01-20T23:07:44+00:00","og_image":[{"width":720,"height":340,"url":"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg","type":"image\/jpeg"}],"author":"Khaled Magdy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Khaled Magdy","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#article","isPartOf":{"@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/"},"author":{"name":"Khaled Magdy","@id":"https:\/\/deepbluembedded.com\/#\/schema\/person\/30259d66cf68c6c681562dbe551b7867"},"headline":"STM32 HAL Library Tutorial","datePublished":"2020-06-02T17:46:43+00:00","dateModified":"2024-01-20T23:07:44+00:00","mainEntityOfPage":{"@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/"},"wordCount":734,"commentCount":2,"publisher":{"@id":"https:\/\/deepbluembedded.com\/#\/schema\/person\/30259d66cf68c6c681562dbe551b7867"},"image":{"@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg","keywords":["STM32 Core"],"articleSection":["Embedded Systems","Embedded Tutorials","STM32 ARM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/","url":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/","name":"STM32 HAL Library Tutorial &#8211; HAL Library Examples - DeepBlue","isPartOf":{"@id":"https:\/\/deepbluembedded.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#primaryimage"},"image":{"@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg","datePublished":"2020-06-02T17:46:43+00:00","dateModified":"2024-01-20T23:07:44+00:00","description":"STM32 HAL Library Tutorial. HAL Library Examples. Documentation and explanation. STM32 CubeMX tutorial and getting started with.","breadcrumb":{"@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#primaryimage","url":"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg","contentUrl":"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg","width":720,"height":340,"caption":"STM32 HAL Library"},{"@type":"BreadcrumbList","@id":"https:\/\/deepbluembedded.com\/stm32-hal-library-tutorial-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/deepbluembedded.com\/"},{"@type":"ListItem","position":2,"name":"STM32 HAL Library Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/deepbluembedded.com\/#website","url":"https:\/\/deepbluembedded.com\/","name":"DeepBlueMbedded","description":"Embedded Systems And Computer Engineering Tutorials &amp; Articles","publisher":{"@id":"https:\/\/deepbluembedded.com\/#\/schema\/person\/30259d66cf68c6c681562dbe551b7867"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/deepbluembedded.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/deepbluembedded.com\/#\/schema\/person\/30259d66cf68c6c681562dbe551b7867","name":"Khaled Magdy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g","caption":"Khaled Magdy"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/a8b5dc7385ec807e129b584974394d27e41c9979f3a2d0fd785b552b73529032?s=96&r=g"},"description":"Principal Embedded Systems Engineer with years of experience in embedded software and hardware design. I work in the Automotive &amp; e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI\/ML, and other fields I'm passionate about. I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?","sameAs":["https:\/\/deepbluembedded.com","https:\/\/www.facebook.com\/khaled.elrawy.359\/","https:\/\/www.instagram.com\/deepbluembedded\/","https:\/\/www.linkedin.com\/in\/khaled-magdy-\/","https:\/\/www.youtube.com\/channel\/UCzLSrNZD4rCjSCOVU9hknvA"]}]}},"jetpack_featured_media_url":"https:\/\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-HAL-Library.jpg","jetpack_shortlink":"https:\/\/wp.me\/p9SirL-16L","jetpack-related-posts":[{"id":4203,"url":"https:\/\/deepbluembedded.com\/stm32-ecosystem-development-environment-setup\/","url_meta":{"origin":4263,"position":0},"title":"STM32 EcoSystem (Development Environment) Setup","author":"Khaled Magdy","date":"June 2, 2020","format":false,"excerpt":"Previous Tutorial Tutorial 0 Next Tutorial Setting-Up STM32 Ecosystem STM32 Course Home Page ???? \u00a0 At the beginning of this series of tutorials, we'll set up the development environment which we'll be using throughout the entire course tutorials, LABs, and projects. In this short tutorial, I'll list down the required\u2026","rel":"","context":"In &quot;Embedded Systems&quot;","block_context":{"text":"Embedded Systems","link":"https:\/\/deepbluembedded.com\/embedded-systems\/"},"img":{"alt_text":"Setting-Up Dev Env Thumbnail","src":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/05\/Setting-Up-Dev-Env-Thumbnail.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/05\/Setting-Up-Dev-Env-Thumbnail.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/05\/Setting-Up-Dev-Env-Thumbnail.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/05\/Setting-Up-Dev-Env-Thumbnail.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6769,"url":"https:\/\/deepbluembedded.com\/stm32-i2c-scanner-hal-code-example\/","url_meta":{"origin":4263,"position":1},"title":"STM32 I2C Scanner HAL Code Example","author":"Khaled Magdy","date":"April 17, 2021","format":false,"excerpt":"Previous Tutorial Tutorial 45 Next Tutorial STM32 I2C Scanner Example STM32 Course Home Page ???? In this short tutorial, we'll be creating an STM32 I2C Scanner example project. To check for the connected slave devices on the I2C bus and report their addresses over UART to our PC. The I2C\u2026","rel":"","context":"In &quot;Embedded Systems&quot;","block_context":{"text":"Embedded Systems","link":"https:\/\/deepbluembedded.com\/embedded-systems\/"},"img":{"alt_text":"STM32 I2C Scanner HAL Example Code","src":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2021\/04\/STM32-I2C-Scanner-HAL-Example-Code.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2021\/04\/STM32-I2C-Scanner-HAL-Example-Code.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2021\/04\/STM32-I2C-Scanner-HAL-Example-Code.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2021\/04\/STM32-I2C-Scanner-HAL-Example-Code.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2021\/04\/STM32-I2C-Scanner-HAL-Example-Code.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":4583,"url":"https:\/\/deepbluembedded.com\/stm32-timer-interrupt-hal-example-timer-mode-lab\/","url_meta":{"origin":4263,"position":2},"title":"STM32 Timer Interrupt HAL Example &#8211; Timer Mode LAB","author":"Khaled Magdy","date":"June 19, 2020","format":false,"excerpt":"In this tutorial, we'll discuss how to configure the STM32 timer module to generate timer interrupts with a couple of example projects (Timer Mode). You'll go through step-by-step HAL example configurations to initialize all the required hardware peripherals. Then, we'll write simple application code to test the hardware functionalities. And\u2026","rel":"","context":"In &quot;Embedded Systems&quot;","block_context":{"text":"Embedded Systems","link":"https:\/\/deepbluembedded.com\/embedded-systems\/"},"img":{"alt_text":"STM32 Timers Explained Tutorial - Timer interrupt HAL Example","src":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Timers-Explained-Tutorial-Timer-interrupt-HAL-Example.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Timers-Explained-Tutorial-Timer-interrupt-HAL-Example.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Timers-Explained-Tutorial-Timer-interrupt-HAL-Example.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Timers-Explained-Tutorial-Timer-interrupt-HAL-Example.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4739,"url":"https:\/\/deepbluembedded.com\/adding-ecual-drivers-to-your-stm32-project-configurations-options\/","url_meta":{"origin":4263,"position":3},"title":"Adding ECUAL Drivers To Your STM32 Project &#038; Configurations Options","author":"Khaled Magdy","date":"June 24, 2020","format":false,"excerpt":"Previous Tutorial Tutorial 20 Next Tutorial Adding ECUAL Drivers To Your STM32 Project & Configurations Options STM32 Course Home Page ???? \u00a0 \u00a0 In this short tutorial, I'll show you the exact steps in a step-by-step guide for adding any ECUAL driver to your STM32 project. And I'll also explain\u2026","rel":"","context":"In &quot;Embedded Systems&quot;","block_context":{"text":"Embedded Systems","link":"https:\/\/deepbluembedded.com\/embedded-systems\/"},"img":{"alt_text":"Adding ECUAL Driver To STM32 Project","src":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Adding-ECUAL-Driver-To-STM32-Project.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Adding-ECUAL-Driver-To-STM32-Project.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Adding-ECUAL-Driver-To-STM32-Project.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Adding-ECUAL-Driver-To-STM32-Project.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4846,"url":"https:\/\/deepbluembedded.com\/stm32-light-sensor-ldr-interfacing-ambient-light-sensor-project\/","url_meta":{"origin":4263,"position":4},"title":"STM32 Light Sensor (LDR) Interfacing &#8211; Ambient Light Sensor Project","author":"Khaled Magdy","date":"June 28, 2020","format":false,"excerpt":"In this LAB, we'll create a simple STM32 project using the LDR (light dependent resistor) as a light sensor to sense the ambient light intensity and map it to a PWM duty cycle and get this signal out on an LED. So that the LED brightness increases as the surrounding\u2026","rel":"","context":"In &quot;Embedded Systems&quot;","block_context":{"text":"Embedded Systems","link":"https:\/\/deepbluembedded.com\/embedded-systems\/"},"img":{"alt_text":"STM32 Light Sensor Interfacing Project With LDR - STM32 Projects And Tutorials","src":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Light-Sensor-Interfacing-Project-With-LDR-STM32-Projects-And-Tutorials.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Light-Sensor-Interfacing-Project-With-LDR-STM32-Projects-And-Tutorials.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Light-Sensor-Interfacing-Project-With-LDR-STM32-Projects-And-Tutorials.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/STM32-Light-Sensor-Interfacing-Project-With-LDR-STM32-Projects-And-Tutorials.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4237,"url":"https:\/\/deepbluembedded.com\/getting-started-with-stm32-arm-cortex-mcus\/","url_meta":{"origin":4263,"position":5},"title":"Getting Started With STM32 ARM Cortex MCUs","author":"Khaled Magdy","date":"June 2, 2020","format":false,"excerpt":"In this introductory tutorial, we'll get a closer look at the STM32 ARM-Cortex based microcontrollers. And it's internal architecture, bused, and features. We'll discuss the reset and clock control circuitry with the clock tree, which we'll configure later on using CubeMX.","rel":"","context":"In &quot;Embedded Systems&quot;","block_context":{"text":"Embedded Systems","link":"https:\/\/deepbluembedded.com\/embedded-systems\/"},"img":{"alt_text":"Getting Started With STM32 ARM Microcontrollers Programming","src":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Getting-Started-With-STM32-ARM-Microcontrollers-Programming.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Getting-Started-With-STM32-ARM-Microcontrollers-Programming.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Getting-Started-With-STM32-ARM-Microcontrollers-Programming.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/deepbluembedded.com\/wp-content\/uploads\/2020\/06\/Getting-Started-With-STM32-ARM-Microcontrollers-Programming.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/posts\/4263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/comments?post=4263"}],"version-history":[{"count":8,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/posts\/4263\/revisions"}],"predecessor-version":[{"id":5685,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/posts\/4263\/revisions\/5685"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/media\/4268"}],"wp:attachment":[{"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/media?parent=4263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/categories?post=4263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deepbluembedded.com\/wp-json\/wp\/v2\/tags?post=4263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}