Bare-Metal Programming vs RTOS Programming

Bare-Metal Programming vs RTOS Programming

In embedded development, bare-metal and RTOS programming are two core implementation methods. This article focuses on the STM32F4xx series MCUs, first explaining the concepts and applicable scenarios of both, and then comparing the code implementation differences between bare-metal and FreeRTOS through three examples: multi-LED blinking, sensor data processing, and button-controlled motor. Finally, it provides selection … Read more

STM32 Serial Bootloader Implementation

STM32 Serial Bootloader Implementation

1. Introduction A bootloader is a critical program responsible for booting and updating embedded devices. In automotive ECUs, during OTA upgrades, the bootloader is responsible for downloading, verifying, and writing new firmware, ensuring that in case of an anomaly, it can revert to the old version to guarantee driving safety. Mobile system updates rely on … Read more

Using DWT Peripheral to Write Delay Functions in STM32

Using DWT Peripheral to Write Delay Functions in STM32

DWT is a debugging peripheral, and one of its core functions is CYCCNT, which is a 32-bit incrementing counter used to record the number of clock cycles executed by the CPU. We can achieve rewriting the HAL_Delay function or implement microsecond-level delays by monitoring the changes in this counter. Appendix: 1. Source Code dwt.delay.h file … Read more

Practical Optimization Techniques in Embedded Development

Practical Optimization Techniques in Embedded Development

Source | Embedded Miscellaneous In embedded development, resources are always scarce. Insufficient memory, slow execution speed, high power consumption… do these issues often trouble you? Today, I will share several code optimization techniques that have been validated in practice! 1. Time Efficiency Optimization Avoid Floating Point Operations // Slow version: floating point operation float calculate_voltage(int … Read more

Navigating Career Choices for a Graduate in Communication Engineering: Communication Algorithms, Embedded Development, or Coding Transition?

Navigating Career Choices for a Graduate in Communication Engineering: Communication Algorithms, Embedded Development, or Coding Transition?

ABOUT ME “Bachelor’s in Electronic Information, Master’s in Computer Science, both from 985 universities.Years of R&D experience in major internet companies. Focused on new engineering disciplines, including college application, major studies, graduate school preparation, career planning, job hunting in internet and state-owned enterprises, and programming improvement…” Recently, a second-year master’s student from a 211 university, … Read more

Daily Record: Enabling Code Completion in Keil

Daily Record: Enabling Code Completion in Keil

I don’t know if you have encountered a problem while using Keil, which is that even after enabling the switch during compilation, it compiles successfully but does not provide code suggestions. For example, in the following situation: At first, I thought there was an issue with my environment. After checking the environment variables and finding … Read more

Chapter 13: The Stabilizing Needle Calms the Mind, Constants Remain Steady as a Mountain

Chapter 13: The Stabilizing Needle Calms the Mind, Constants Remain Steady as a Mountain

Chapter 13: The Stabilizing Needle Calms the Mind, Constants Remain Steady as a Mountain The stabilizing needle calms the mind, constants remain unchanged like a mountain.Staying true to the original intention leads to the great way; both cultivation and programming are equally suitable. The morning sunlight streamed through the window into the conference hall, where … Read more

Embedded Sensor Series – Comprehensive Guide to GY-906 Non-Contact Infrared Temperature Sensor

Embedded Sensor Series - Comprehensive Guide to GY-906 Non-Contact Infrared Temperature Sensor

Next, I will present embedded practical projects in the form of sensors + projects. Today, we will learn about the first article in the embedded sensor series – a comprehensive guide to using the GY-906 non-contact infrared temperature sensor. In the world of embedded development, sensors act like “eyes” and “ears” that allow devices to … Read more

Python Black Technology: Official API Documentation for Baidu Speech Recognition

Python Black Technology: Official API Documentation for Baidu Speech Recognition

This is the official API documentation for speech recognition in Baidu API.https://cloud.baidu.com/doc/SPEECH/s/JlbxdezufUnlike text recognition, which provides test code directly, speech recognition does not offer such straightforward access; instead, it provides descriptions of the interfaces, parameter explanations, and so on.In the Online Debugging & Sample Code section of the document, there is code available on GitHub:https://github.com/Baidu-AIP/speech-demoOf … Read more