Tất cả tags
#

Tag

#STM32

Có 69 nội dung trong tag này.

Nội dung liên quan

#STM32

Ngôn ngữ
Blog STM32 / Firmware

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.

#USB #STM32 #HID +4
Blog STM32 / Firmware

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.

#USB #STM32 #CDC +4
Blog STM32 / Firmware

Composite Debug Tool: GUI test tổng hợp cho STM32 USB

GUI Python gộp CDC log, vendor command và RAM dump vào một màn hình: pattern queue-poll thống nhất trong tkinter, và vì sao viết GUI mới không đụng vào phần USB đã có.

#USB #STM32 #Python +4
Blog STM32 / Firmware

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.

#USB #STM32 #HID +4
Blog STM32 / Firmware

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.

#USB #STM32 #Vendor +4
Ghi chú USB

CubeMX USB pitfalls thường gặp

Những điểm CubeMX không làm đúng khi generate USB code: HID mouse descriptor thay vì keyboard, NVIC không bật, Sof_enable DISABLE, USBD_static_malloc sai kích thước.

#STM32 #CubeMX #USB +3
Ghi chú USB

USB Bulk Transfer cho debug dump là gì?

Bulk IN cho RAM dump trên STM32G0: state machine chunk 64 byte, DataIn callback pipeline, tại sao không dùng ZLP, Zadig cho Windows và throughput thực đo.

#USB #Bulk #STM32 +3
Ghi chú USB

USB CDC ACM là gì?

CDC ACM trên STM32: tại sao giống UART về trải nghiệm nhưng khác về implementation, SET_CONTROL_LINE_STATE, DTR và điểm dễ nhầm khi dùng với terminal.

#USB #CDC #STM32 +2
Ghi chú USB

USB Vendor Request qua EP0 là gì?

EP0 Vendor Request trên STM32: bmRequestType 0xC0, dispatch trong Composite_Setup, tại sao không được gọi CdcLog_Printf trong handler và pattern pending log flag.

#USB #Vendor #EP0 +2
Blog STM32 / Firmware

What Is a USB Descriptor?

The concept and structure of USB descriptors, explained with real examples. Includes a look at how Boot Protocol fits into the Configuration Descriptor.

#USB #STM32 #Descriptor +4
Blog STM32 / Firmware

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.

#STM32 #GPIO #Keypad +3
Blog STM32 / Firmware

USB Descriptor là gì?

Giải thích khái niệm và cấu trúc của USB Descriptor kèm ví dụ. Lưu ý về Boot Protocol trong Configuration Descriptor

#USB #STM32 #Descriptor +4
Blog STM32 / Firmware

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.

#STM32 #GPIO #Keypad +3
Dự án STM32

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.

#STM32 #USB #HID +5
Dự án STM32

STM32G0 USB Lab: Host Debug Tool

Python tool giao tiếp với USB composite device STM32G0: CLI smoke test 4 vendor commands qua EP0 và GUI test tổng hợp HID, CDC log, vendor bulk dump trên một màn hình.

#STM32 #USB #Python +5
Dự án STM32

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.

#STM32 #GPIO #Keypad +3
Sắp ra mắt
Blog STM32 / Firmware

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.

#STM32 #Firmware #FreeRTOS +1
Note STM32

What Is STM32 GPIO Register Access?

Accessing GPIO through BSRR and IDR instead of HAL_GPIO_WritePin/ReadPin: why, when it's worth it, and how it applies to row-by-row matrix scanning on STM32.

#stm32 #gpio #register +5
Ghi chú STM32

STM32 GPIO Register Access là gì?

Truy cập GPIO bằng BSRR và IDR thay vì HAL_GPIO_WritePin/ReadPin: tại sao, khi nào phù hợp, và cách áp dụng cho matrix scan row-by-row trên STM32.

#stm32 #gpio #register +5
Sắp ra mắt
Ghi chú STM32

Clock Configuration for USB FS là gì?

USB Full-speed cần clock 48 MHz chính xác. Các nguồn clock khả dụng trên STM32, trade-off giữa HSI48+CRS và HSE+PLL, và checklist kiểm tra trước khi debug enumeration.

#stm32 #usb #clock +5
Sắp ra mắt
Ghi chú USB

USB Enumeration Debugging là gì?

Cách debug USB enumeration fail từ tool đến log: USBView trên Windows, Wireshark USB capture, sysfs trên Linux và cách đọc lỗi enumeration theo từng bước.

#usb #debugging #enumeration +5
Coming soon
Note Keyboard

What Is a Debounce Algorithm?

Why mechanical keys bounce, and how to handle it with counter-based debounce, timestamp debounce, scan buffers, and a state machine in firmware.

#keyboard #debounce #gpio +4
Note USB

What Is the HID Keyboard Report Format?

The 8-byte structure of an HID keyboard report: the modifier byte, the reserved byte, and 6 keycode slots. How to send a report from STM32 middleware.

#usb #hid #keyboard +5
Coming soon
Note USB

What Are HID Usage Tables?

Usage Page and Usage in HID, explained. A full lookup table for the Keyboard/Keypad Page 0x07: letters, digits, punctuation, numpad, lock keys, F-keys.

#usb #hid #usage-tables +4
Note USB

What Is a USB Descriptor Overview?

The hierarchical structure of USB descriptors: Device, Configuration, Interface, Endpoint - wTotalLength, bDescriptorType, and what commonly breaks enumeration.

#usb #descriptor #device-descriptor +5
Coming soon
Note USB

What Is the USB Enumeration Process?

A sequence of requests over Endpoint 0, from device plug-in to the host assigning an address and picking a configuration - 7 steps, where things fail, and how to debug bottom-up.

#usb #enumeration #stm32 +4
Ghi chú Keyboard

Debounce Algorithm là gì?

Tại sao phím cơ học bounce và cách xử lý bằng counter-based debounce, timestamp debounce, scan buffer và state machine trong firmware.

#keyboard #debounce #gpio +4
Ghi chú USB

HID Keyboard Report Format là gì?

Cấu trúc 8 byte của HID keyboard report: modifier byte, reserved byte, 6 keycode slot. Cách gửi report từ STM32 middleware.

#usb #hid #keyboard +5
Sắp ra mắt
Ghi chú USB

HID Report Descriptor là gì?

HID Report Descriptor mô tả cấu trúc và ý nghĩa từng byte trong HID report. Usage Page, Usage, Collection, Input/Output — ngữ pháp tối thiểu cần biết để viết HID firmware.

#usb #hid #report-descriptor +5
Ghi chú USB

HID Usage Tables là gì?

Giải thích Usage Page và Usage trong HID. Bảng tra đầy đủ Keyboard/Keypad Page 0x07 (chữ, số, dấu câu, numpad, phím khoá, F-key).

#usb #hid #usage-tables +4
Sắp ra mắt
Ghi chú Keyboard

Keyboard Matrix Fundamentals là gì?

Tại sao bàn phím dùng matrix thay vì một dây mỗi phím. Cách quét hàng/cột, GPIO setup, active-low convention, ghosting và khi nào thực sự cần diode.

#keyboard #matrix #gpio +5
Sắp ra mắt
Ghi chú STM32

STM32 HAL USB Device Architecture là gì?

Kiến trúc STM32 USB Device Library: PCD driver, USBD core, class layer và callback flow. Firmware cần implement gì, middleware xử lý gì và cách debug đúng tầng.

#stm32 #usb #hal +5
Ghi chú USB

USB Descriptor Overview là gì?

Cấu trúc phân cấp USB descriptor: Device → Configuration → Interface → Endpoint. wTotalLength, bDescriptorType, cách host đọc từng bước và điểm dễ gây enumeration fail.

#usb #descriptor #device-descriptor +5
Ghi chú USB

USB Enumeration Process là gì?

Chuỗi hỏi–đáp qua Endpoint 0 từ lúc device cắm vào đến khi host giao address và chọn configuration. 7 bước, điểm nào dễ fail và cách debug từ dưới lên.

#usb #enumeration #stm32 +4
Ghi chú USB

USB Transfer Types là gì?

So sánh Control, Interrupt, Bulk và Isochronous transfer: dùng ở đâu, đảm bảo gì, và dễ debug sai ở điểm nào — đặc biệt là cách bInterval thực sự hoạt động trên Windows.

#usb #transfer-types #interrupt-transfer +6
Sắp ra mắt
Ghi chú STM32

GNU ld warning: LOAD segment with RWX permissions là gì?

Giải thích warning LOAD segment with RWX permissions khi build STM32 bằng GNU ld, vì sao nó xuất hiện, có nguy hiểm không, và cách xử lý bằng linker script PHDRS.

#STM32 #Linker Script #GNU ld +3
Sắp ra mắt
Ghi chú STM32

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 #Linker Script #Flash +3
Sắp ra mắt
Dự án STM32

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 #Bootloader #UART +4
Sắp ra mắt
Ghi chú STM32

Tạo file BIN từ ELF trong STM32CubeIDE

Quick note về cách export file .bin từ .elf trong STM32CubeIDE bằng objcopy, post-build command, và cách kiểm tra file BIN đã tạo đúng chưa.

#stm32 #cubeide #elf +5
Sắp ra mắt
Ghi chú STM32

ELF, BIN, HEX và little-endian trên STM32

Giải thích sự khác nhau giữa ELF, BIN, HEX khi build firmware STM32, vì sao bootloader thường nhận file BIN, và cách đọc vector table theo little-endian.

#stm32 #elf #bin +4
Sắp ra mắt
Dự án STM32

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 #Flash #EEPROM Emulation +4
Sắp ra mắt
Dự án STM32

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 #FreeRTOS #CMSIS-RTOS +4
Blog STM32 / Firmware

The Four Transfer Types, from a Firmware Point of View

When do you use Interrupt, Bulk, Control, or Isochronous? The role of bInterval and SOF timing, and how they shape USB Device firmware design.

#USB #Transfer Type #Interrupt Transfer +6
Blog STM32 / Firmware

Bốn loại Transfer dưới góc nhìn firmware

Khi nào dùng Interrupt, Bulk, Control hay Isochronous? Vai trò và ảnh hưởng của bInterval, SOF timing đến việc thiết kế USB Device.

#USB #Transfer Type #Interrupt Transfer +6
Sắp ra mắt
Dự án STM32

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.

#STM32 #UART #DMA +4
Blog STM32 / Firmware

Starting a series on USB Device on STM32

A journey through USB knowledge, from theory to a real project on STM32G0: from protocol fundamentals to a working composite device firmware.

#USB #STM32 #Firmware +2
Blog STM32 / Firmware

Mở đầu series về USB Device trên STM32

Hành trình tổng hợp lại kiến thức USB từ lý thuyết cho đến thực hành với project thực tế trên STM32G0.

#USB #STM32 #Firmware +2
Sắp ra mắt
Blog STM32 / Firmware

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 #STM32 #RTOS +6
Coming soon
Blog STM32 / Firmware

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 #STM32 #RTOS +5
Sắp ra mắt
Blog STM32 / Firmware

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.

#FreeRTOS #STM32 #RTOS +5
Coming soon
Blog STM32 / Firmware

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.

#STM32 #UART #DMA +3
Sắp ra mắt
Blog STM32 / Firmware

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.

#STM32 #UART #DMA +3
Coming soon
Note STM32 Debug

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.

#stm32 #embedded-c #ring-buffer +6
Sắp ra mắt
Ghi chú STM32 Debug

DMA Normal vs Circular Mode trong STM32 là gì?

Giải thích DMA Normal và Circular Mode trong STM32: luồng truyền, buffer, half/full callback, UART/ADC, ring buffer và debug mất dữ liệu.

#stm32 #embedded #dma +6
Sắp ra mắt
Ghi chú STM32 Debug

FreeRTOS ISR Mutex là gì?

Giải thích vì sao không dùng mutex trong ISR với FreeRTOS: interrupt context, FromISR API, queue/semaphore, priority và debug deadlock.

#stm32 #freertos #rtos +6
Sắp ra mắt
Ghi chú STM32 Debug

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.

#stm32 #embedded-c #gcc +6
Sắp ra mắt
Ghi chú STM32 Debug

HAL_BUSY UART DMA là gì?

Giải thích HAL_BUSY khi dùng UART DMA trong STM32: HAL state, DMA callback, gState/RxState, race condition, timeout và debug không gửi được.

#stm32 #uart #dma +6
Sắp ra mắt
Ghi chú STM32 Debug

Producer Consumer Logging trong STM32 là gì?

Giải thích Producer Consumer Logging trong STM32: ISR/task producer, log queue, UART DMA consumer, ring buffer, drop policy và debug mất log.

#stm32 #embedded #logging +6
Sắp ra mắt
Ghi chú STM32 Debug

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.

#stm32 #embedded-c #logging +6
Sắp ra mắt
Ghi chú STM32 Debug

STM32 printf _write redirect là gì?

Giải thích redirect printf qua _write trong STM32: syscall, UART blocking, DMA/ring buffer, reentrancy, FreeRTOS và debug log bị treo.

#stm32 #printf #write +6
Sắp ra mắt
Ghi chú STM32 Debug

UART Baudrate Time Calculation là gì?

Giải thích cách tính thời gian truyền UART từ baudrate: bit time, frame format, start/stop/parity, throughput, timeout và debug mất log.

#stm32 #uart #baudrate +6
Sắp ra mắt
Ghi chú STM32 Debug

UART Transmit Blocking là gì?

Giải thích UART Transmit Blocking trong STM32: HAL_UART_Transmit, baudrate timing, timeout, ISR/RTOS impact, printf blocking và debug treo log.

#stm32 #uart #blocking +6
Sắp ra mắt
Ghi chú STM32

Flash, EEPROM và RAM trong STM32 khác nhau thế nào?

Giải thích Flash, EEPROM và RAM trong STM32: vùng nhớ, dữ liệu mất hay giữ sau reset, EEPROM emulation, linker script và debug lỗi lưu cấu hình.

#stm32 #embedded #flash +5
Sắp ra mắt
Ghi chú STM32

Flash Operations trong STM32 là gì?

Giải thích thao tác Flash trong STM32: unlock, erase, program, verify, lock, page/sector, alignment, HAL error và debug ghi Flash an toàn.

#stm32 #embedded #flash +6
Sắp ra mắt
Ghi chú STM32

Linker Script STM32 là gì?

Giải thích linker script STM32: memory regions, sections .text/.data/.bss, stack heap, Flash data area, bootloader offset và debug map file.

#stm32 #embedded #linker-script +6
Sắp ra mắt
Ghi chú STM32

Reset Vector và Bootloader trong STM32 là gì?

Quick note ngắn gọn về Reset Vector, vector table, Initial MSP, Reset_Handler, VTOR và flow bootloader jump vào application trên STM32/Cortex-M.

#stm32 #embedded #reset-vector +6
Ghi chú STM32 Debug

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.

#stm32 #embedded-c #ring-buffer +6
Sắp ra mắt
Ghi chú STM32

Startup Code STM32 là gì?

Giải thích Startup Code trong STM32: vector table, Reset_Handler, copy .data, clear .bss, SystemInit, main và debug lỗi trước main.

#stm32 #embedded #startup-code +5
Sắp ra mắt
Ghi chú STM32

STM32G0 Dual Bank là gì?

Giải thích STM32G0 Dual Bank Flash: bank layout, page erase, read-while-write, boot bank, firmware update, EEPROM emulation và debug sai bank.

#stm32 #stm32g0 #embedded +5