Firmware Architecture
EnderDeck is built on STM32CubeF2 HAL, FreeRTOS, and LVGL 8.4, linked at 0x08008000 to preserve the stock 32 KB BigTreeTech SD-card bootloader.
Multithreaded Task Model
| Task | Priority | Period | Responsibility |
|---|---|---|---|
Task_Hardware | 3 | 1 ms | Quadrature encoder, button short/long press, buzzer, knob LEDs |
Task_Serial | 3 | 10 ms | USART2 RX/TX ring buffer + NDJSON parser |
Task_UI | 2 | 5 ms | LVGL 8.4 flush over 16-bit FSMC, XPT2046 touch, overlays |
Task_Demo | 1 | 100 ms | Standalone simulator (auto-pauses when PC link is active) |
Task_Storage | 1 | 5 ms | Hot-plug read-only FatFs for SD (0:) and USB-A Host (1:) |
Storage Split
- Onboard W25Q64 (SPI3): Stores touch calibration, brightness, and buzzer flags with CRC32.
- SD Card (
SPI1,0:) & USB-A (USB_OTG_FS,1:): Mounted strictly_FS_READONLY = 1so media is never modified.