Nội dung liên quan
#Embedded C
Finishing a Real HID Keyboard, from Keypress to Release
Turning key press and release events into HID reports and sending them to the host, plus what to watch out for with Boot Protocol and tap-style null reports.
Firmware Log với USB CDC Debug Channel
Triển khai CDC debug channel trên STM32G0: descriptor CDC, ring buffer, ISR-safe logging và tránh xung đột DTR khi host mở COM port.
Hoàn thành HID keyboard thật từ sự kiện nhấn thả phím
Chuyển sự kiện nhấn thả phím thành HID report rồi gửi đến host kèm theo các lưu ý về Boot Protocol hay tap-style null report.
Vendor Request và Bulk IN trên STM32G0
EP0 vendor command và Bulk IN RAM dump trên STM32G0: pending log flag, tại sao không dùng ZLP, Zadig cho Windows, và output thật từ vendor_test.py.
Designing the Input Pipeline Before the USB Layer
How input flows from a keypad through scanning, debounce, key policy, and an event queue, and the tradeoffs made before an HID report ever gets built.
Thiết kế input pipeline trước tầng USB
Giải thích thiết kế tạo input từ keypad qua các tầng scan, debounce, key policy, event queue và những đánh đổi trước khi tạo HID report.
STM32G0 USB Lab: Composite Device
USB composite device trên STM32G0B1RE: HID Keyboard + CDC log + EP0 Vendor Request + Vendor Bulk IN. Một codebase phát triển từ HID đơn đến debug tool hoàn chỉnh qua commit/tag.
STM32G0 USB Lab: Key Input Pipeline
Keypad 4x4 matrix trên STM32G0B1RE: quét bằng BSRR/IDR trực tiếp, TIM6 5ms, debounce 2 mẫu, event queue và chính sách simultaneous-error cho ma trận không diode.
Series tổng hợp kiến thức về STM32 Firmware thực chiến
Từ những vấn đề thật trong firmware POS đến thiết kế thật: logger non-blocking, FreeRTOS architecture, Flash EEPROM emulation và dual-slot bootloader trên STM32G0.
UEFI 01: Hello World UEFI Application
UEFI application đầu tiên với EDK2: cấu trúc BejPkg package, build HelloUefi.efi và chạy trong UEFI Shell trên QEMU/OVMF. Ghi lại lỗi thật gặp với EDK2 phiên bản mới.
VMA và LMA trong linker script STM32 là gì?
Giải thích sự khác nhau giữa VMA và LMA trong linker script STM32, vì sao .data chạy ở RAM nhưng lại được lưu trong Flash, và vai trò của các symbol như _sidata, _sdata, _edata.
STM32 Dual-Slot UART OTA Bootloader
Case study xây dựng bootloader A/B cho STM32G0B1RE, hỗ trợ cập nhật firmware qua UART, xác thực packet CRC32, metadata pending/confirmed và rollback.
STM32 Flash EEPROM Emulation
Project EEPROM emulation trên STM32G0B1RE dùng Flash Bank 2, append-only record, two-page transfer, CRC và fault injection bằng software reset.
STM32 FreeRTOS Firmware Skeleton
Project thực nghiệm FreeRTOS skeleton trên STM32G0B1RE, kiểm tra task timing 10 ms/100 ms, event queue, UART log mutex, monitor task và queue full policy bằng log thật.
STM32 Dual-Slot UART Bootloader: BIN Update, VTOR và Safe Rollback
Thiết kế bootloader STM32G0B1RE dual-slot, update qua UART, validate vector table, CRC32 từng packet, metadata pending/confirmed và rollback tự động.
STM32 Non-Blocking UART Logger
Project thực nghiệm UART logger non-blocking trên STM32G0B1RE, so sánh blocking transmit với UART DMA + Ring Buffer và drop counter.
Flash STM32G0: Linker Script, EEPROM Emulation và Dual Bank
Từ linker script chia vùng Flash, erase/write API, tại sao single-bank freeze, đến nguyên lý EEPROM emulation trên STM32G0 dual bank.
Thiết kế firmware STM32 với FreeRTOS: task ownership, signaling và HAL wrapper
Từ demo nhiều task sang kiến trúc firmware thật: cách tổ chức task ownership, chọn đúng primitive signal, tránh race condition và viết HAL wrapper để dễ port.
FreeRTOS on STM32: Tasks, Queues, Mutexes, and How to Organize Firmware into Modules
Building a FreeRTOS skeleton on STM32: tasks, queues, mutexes, and how to split firmware into independent modules.
FreeRTOS trên STM32: Task, Queue, Mutex và cách tổ chức firmware theo module
Triển khai FreeRTOS skeleton trên STM32: task, queue, mutex, và cách chia firmware thành các module độc lập.
Non-Blocking UART Logger on STM32 with DMA + Ring Buffer
Designing a non-blocking UART debug logger for STM32: avoiding printf blocking, handling lost logs with DMA, and using a ring buffer with DMA callbacks.
UART non-blocking logger trên STM32 với DMA + Ring Buffer
Thiết kế debug UART non-blocking cho STM32: tránh printf blocking, xử lý mất log với DMA, dùng ring buffer và DMA callback.
What Is a Ring Buffer in Embedded C?
Ring buffers in embedded C, explained: head/tail, full/empty, ISR producers, task consumers, DMA circular buffers, overflow, and debugging dropped bytes.
GCC Dead Code Elimination là gì?
Giải thích GCC Dead Code Elimination trong embedded C: tối ưu loại code, linker garbage collection, section, KEEP, volatile và debug hàm bị mất.
Production Debug Log Macro trong STM32 là gì?
Giải thích Production Debug Log Macro trong STM32: log level, compile-time filter, module tag, zero-cost log, ISR-safe và debug release build.
Ring Buffer trong Embedded C là gì?
Giải thích Ring Buffer trong Embedded C: head/tail, full/empty, ISR producer, task consumer, DMA circular, overflow và debug mất byte.