The Essence of Embedded Systems – Firmware Edition (STM32 Discovery Board)
If you’ve understood the overall flow in *The Essence of Embedded Systems – Fundamentals*, it’s now time to implement STM32 firmware yourself. Using an STM32 Discovery Board, you’ll systematically learn everything from CubeMX configuration to implementing firmware based on GPIO, UART, timers, and interrupts. This course goes beyond simply using HAL APIs, covering how to connect peripherals and design systems within a real project workflow. Rather than practicing individual functions in isolation, you’ll gain hands-on experience completing an entire firmware system.
77 learners
Level Basic
Course period Unlimited


News
9 articles
Hello.
I'm Huchu Appa from the Coding Beginner Rescue Squad.
This time, let's talk about theHAL_Delay()function, which is commonly used when developing STM32 firmware.Let's say we're writing code to make an LED blink every second.
while (1) { HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_12); HAL_Delay(1000); }This is simple and intuitive code.
But what if we add button input checks or sensor data processing?
While HAL_Delay(1000) is running, the current code flow pauses for about one second.
To be precise, the entire MCU does not stop, and interrupts can continue running. However, other tasks that need to be performed in the main loop are delayed by that amount.
So, is there a way to blink the LED while handling other tasks?
Another option is to useHAL_GetTick()as follows.uint32_t previous = HAL_GetTick(); while (1) { if ((uint32_t)(HAL_GetTick() - previous) >= 1000U) { previous = HAL_GetTick(); HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_12); } // 다른 작업 수행 }With this approach, you can perform other tasks between LED updates.
Of course, this doesn’t meanHAL_Delay()is a bad function. It’s perfectly useful for simple waits or initialization. What matters is understanding your program’s execution flow and choosing the right approach for the situation.This Week’s Little Challenge!
Try adding button input while controlling an LED in two different ways.
Compare how the response speed changes when you press the button.
Thinking through these issues is also an important foundation for understanding concepts you’ll learn later, such as timers, interrupts, and RTOS.Thank you.
Sincerely, the Coding Newbie Rescue TeamHello.
This is Huchu Dad from Coding Beginner Rescue.
Thanks to your interest and support, the total number of students enrolled in Coding Beginner Rescue has surpassed 400! (Round of applause 👏👏~)When I first started preparing this course, I hoped it would be of some help to those studying embedded systems. Before I knew it, I had the pleasure of joining so many of you on this journey.
I’m sincerely grateful to everyone who has taken the course and left a thoughtful review or question.There may still be areas that need improvement, but I will continue creating courses that go beyond simply following along with the code and help you understand how hardware and software work and develop the ability to solve problems on your own.
In the upcoming RTOS course and future courses, I’ll faithfully incorporate the experience and know-how I’ve built up so far.
Once again, I sincerely thank all the students who have joined me.Thank you.
Sincerely, the Coding Beginners Rescue TeamHello.
This is Huchu Dad from the Beginner Coder Rescue Team.
This time, I’d like to talk about a situation you’re likely to encounter at least once when starting firmware development.Suppose you wrote the following code to turn on an LED on an STM32.
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_12, GPIO_PIN_SET);
The compilation completes successfully, and the firmware is downloaded to the board without any issues.
But if the LED does not turn on, what should you check first?Even if the code appears to have no issues, there can be various reasons why the hardware does not work.
Is the GPIO clock enabled?
Is the pin configured as an output?
Is the pin number to which the actual LED is connected correct?
Is the LED Active High or Active Low?
For example, if the GPIO clock is not enabled, you may not get the expected behavior even when accessing the GPIO registers.
In STM32 HAL, enable the GPIO clock as follows.__HAL_RCC_GPIOD_CLK_ENABLE();
Also, if the LED is connected in an Active Low configuration, you may need to outputGPIO_PIN_RESETinstead ofGPIO_PIN_SETto turn it on.Then how do actual developers solve the problem?
Rather than modifying the code haphazardly, they check the following in order.Check the LED connection through the datasheet and schematic.
Check the GPIO settings in CubeMX
Check whether the code is actually executing using a debugger
If necessary, check the pin output with a multimeter or logic analyzer.
This process is commonly referred to as debugging that examines both hardware and software.
This week's small challenge!
Take a look at the LED control code for the STM32F4-Discovery board used in the firmware section.
What difference would occur if you changed the GPIO output mode from Push-Pull to Open-Drain?
Before changing the setting, try predicting the result first, then compare it with the actual behavior.
What matters in firmware development is not simply the ability to write code.
Understanding what behavior the code you write produces on actual hardware is an important foundation for growing as a firmware engineer.Thank you.
From the Coding Newbie Rescue Team
Hello.
I'm Huchu Dad from the Coding Beginner Rescue Squad.
STM32 exercises involve not only code but also CubeMX settings, the build environment, Flash, wiring, and peripheral configurations working together. So when a problem occurs, if you let me know which stages are currently working properly, I can identify the cause much more quickly.When asking a question, if possible, please include the following information as well.
Which course and which exercise it is
Whether the build and flash complete successfully
How far it works properly
The difference between the expected behavior and the actual behavior
If there is a compile/link error, include the full error message
Related code and CubeMX settings
If it is a hardware issue, a photo of the wiring
For example, rather than
❌ "The LCD isn't displaying anything."⭕ "I’m working on an I2C LCD exercise. Build and Flash complete successfully, and no errors occur in the HAL API. The LCD backlight turns on, but no text is displayed. The CubeMX I2C settings and current wiring are as follows."
Or,
❌ "PWM is acting strangely."
Rather,
⭕ "I am practicing SG90 servo motor PWM. PWM output is generated after configuring the timer, but the servo motor does not move to the desired angle. The Prescaler/Period settings are as follows, and the period and pulse width measured with a Logic Analyzer are as follows."
It would be helpful if you could leave it like this.Especially in firmware,
Build → Flash → peripheral initialization → signal generation → actual device operation
it is important to develop the habit of checking one by one how far things are working normally.More important than asking a good question is communicating as accurately as possible what you currently know and what you have verified. If you're not sure, it's okay to write only what you know.
If you get stuck while taking the course, feel free to leave a question anytime. :)
Thank you.
Best regards, the Coding Beginner Rescue TeamHello.
This is Huchu’s dad from the Coding Beginners Rescue Team.Before long, the Chuseok holiday next week will be here.
Thank you to all the students who have sought out the firmware course and worked hard alongside me.Since this course includes many hands-on exercises implementing everything from GPIO to UART, PWM, I2C, ADC, and Timer, I hope you take ample time to experience the process of implementing each one yourself and checking that it works, rather than rushing through the lessons.
It’s perfectly fine to take a short break during the long holiday, and if you find yourself with some free time, you could slowly follow along with one of the exercises you fell behind on. Please don’t rush to complete the course—enjoy following along at your own pace~We hope you have a joyful and relaxing Chuseok holiday with your family. :)
Thank you.
Sincerely, the Coding Beginners Rescue TeamHello.
This is Huchu’s dad from the Coding Beginners Rescue Team.It’s already been several weeks since the firmware section was opened.
I imagine many of you are still actively taking the course.
Thank you for seeking out the course and joining me. :)As you follow this course, rather than memorizing HAL APIs or code,
try to focus a little more on learning the overall process of configuring, implementing, and verifying a single peripheral.
As you repeatedly practice everything from GPIO to timers, you’ll gradually get a feel for where to start when you encounter a sensor or module you’ve never seen before.
If you run into anything confusing or have any questions while taking the course, please feel free to leave a question anytime.Thank you.
From the Coding Beginners Rescue TeamHello.
This is Huchu Dad from Korini Rescue Team.“The Essence of Embedded Systems – Firmware Edition” has been open for two weeks already.
You can currently access the Firmware Edition at an early-bird discount, and
even afterward, if you take both the Fundamentals and Firmware Editions through the “The Essence of Embedded Systems” Roadmap, you can enroll at a 30% discounted price.If you know someone who is just starting to study embedded systems or wants to properly begin firmware development using
STM32, I would appreciate it if you could introduce them to the course and roadmap.Going forward, rather than ending with just one course, we will steadily build an embedded systems learning roadmap that progresses from
fundamentals -> firmware -> RTOS -> Linux.If you have any questions while taking the course, please feel free to leave them anytime.
Thank you.
Best regards, the Coding Beginner Rescue TeamHello,
I'm Pepper's Dad from the Coding Newbie Rescue Team.The Essence of Embedded Systems series' second course, the Firmware Edition, has officially launched.
A 30% early bird discount is currently in progress to celebrate the release.
Also, during this period, 『The Essence of Embedded Systems - Basic Edition』 is also having a 25% discount event.
If you are new to embedded systems, I recommend starting with the Basic Edition.
We ask for your interest and help in promoting the lecture. :)Thank you.
Best regards, Corini Rescue Team

