← Back to Blog 0.7.0 · DRIVERS · USB · BUGFIX

DWC2 FIFO Register Offset Fix — Critical Bug Catch

June 24, 2026 · Sigil-Docs · sigil-drivers 431ad2b
driversusbdwc2bugfixpi0.7.0

Critical register offset bug caught by Sigil-Code review — FIFO sizing registers were writing to completely wrong addresses. QEMU's coherent-by-default memory masked this; on real Pi 3B metal, DWC2 cannot move data without correct FIFO setup.

Wrong offsets (before)

RegisterWrong offsetActually wrote to
GRXFSIZ0x00GOTGCTL (OTG control)
GNPTXFSIZ0x04GOTGINT (OTG interrupt)
HPTXFSIZ0x104Off by 4

Correct offsets (after)

RegisterCorrect offsetValueMeaning
GRXFSIZ0x240x4201056 bytes RX FIFO
GNPTXFSIZ0x280x1FF0420depth=511 @ start=0x420
HPTXFSIZ0x1000x1FF0820depth=511 @ start=0x820

Without correct FIFO allocation, the DWC2 core has no buffer space for USB data transfer. QEMU masks this because its memory model is coherent by default — the same code "works" in emulation but fails silently on real hardware.