STM32 Bare Metal GPIO Analog Input Tutorial | No HAL, No Libraries | STM32F401

Опубликовано: 17 Май 2026
на канале: STMetaTronics
161
4

Welcome to another bare-metal STM32 programming tutorial! 🚀 Today, we are ditching the HAL (Hardware Abstraction Layer) and standard libraries to configure a GPIO pin for Analog Input completely from scratch on the STM32F401 microcontroller.

Understanding how to set up analog pins at the register level is the crucial first step to mastering the STM32's ADC (Analog-to-Digital Converter). In this video, we open up the Reference Manual, walk through the exact memory addresses we need, and write pure C code to enable the peripheral clocks and configure the GPIO Mode Register (MODER).

If you want to truly understand what's happening under the hood of your microcontroller, this video is for you!

👇 Resources & Links Mentioned in this Video 👇

💻 Source Code (GitHub): https://github.com/stmetatronics/GPIO...

🛠️ Hardware Used:

STM32F401 Development Board (Nucleo-F401RE / Black Pill)

10k Potentiometer

Breadboard & Jumper Wires

ST-Link V2 (if using a standalone board)

⏱️ Timestamps:
0:00 - Introduction & What We're Building
1:15 - Hardware Setup (Connecting the Potentiometer)
2:30 - Why Bare Metal? (Registers vs. HAL)
3:45 - Reference Manual Deep Dive: RCC & GPIO Registers
6:10 - Writing the Bare Metal Code (C Programming)
9:20 - Compiling, Flashing, and Debugging
11:30 - Summary & What's Next (ADC Configuration)

👍 Enjoyed the video? If you found this tutorial helpful, please hit the LIKE button and SUBSCRIBE for more bare-metal embedded systems content! Let me know in the comments what STM32 peripheral you want to see covered next.

🔔 Don't forget to turn on notifications so you never miss a new video!

#STM32 #BareMetal #EmbeddedSystems #Microcontroller #STM32F401 #CProgramming #Electronics #Engineering #LearnToCode #Hardware