Key specifications
Feature | Value |
---|---|
CPU | ARM Cortex-M0+ @ 48 MHz |
Flash | 256 KB (firmware occupies ~60 KB) |
SRAM | 32 KB |
USB | Full-speed device with HID + CDC composite support |
GPIO | 38 general-purpose pins |
Timers | 9 (TC/TCC) used for PWM, debouncing, and TOTP timing |
ADC | 12-bit, used for IV entropy sampling |
Clock configuration
- Internal 8 MHz oscillator feeds the Digital Frequency Locked Loop (DFLL).
- DFLL multiplies to 48 MHz for the CPU and synchronous peripherals.
- The generic clock controller divides the 48 MHz clock for:
- 1 MHz I²C (SERCOM3) used by EEPROM and OLED
- 2 MHz SERCOM1 for the touch controller SPI
- 32 kHz reference for millisecond timing (via
SysTick
)
Peripheral mapping
Peripheral | SERCOM | Function |
---|---|---|
SERCOM0 | USART | CDC serial channel (TX/RX on USB pads) |
SERCOM1 | SPI | Touch controller (TS06) |
SERCOM2 | I²C | Reserved/debug headers |
SERCOM3 | I²C | EEPROM (M24C64-W) + OLED display (SSD1306) |
SERCOM4 | Unused | Available for future expansions |
SERCOM5 | USB | Native USB full-speed interface |
PORT
multiplexer assigns each SERCOM to specific pins; see the KiCad design for exact pad numbers.
Memory layout
- Bootloader (8 KB) – UF2-compatible loader for factory flashing and community updates.
- Application (240 KB max) – ZeroKeyUSB firmware; currently uses <30% of available flash.
- EEPROM emulation is unused; all persistent data lives in the external M24C64-W.
- SRAM buffers:
- 512 bytes for OLED frame buffer
- 128 bytes for USB HID reports
- 96 bytes scratch space for AES blocks
Power and sleep
- The MCU runs in active mode while connected; consumption stays below 25 mA for the whole board.
- After 60 seconds of inactivity the firmware dims the OLED and places the CPU into Standby while keeping USB active.
- Touch or USB activity wakes the chip in under 3 ms.
Firmware responsibilities
- Authenticating the Master PIN using AES routines.
- Orchestrating the menu, display, and touch interactions.
- Managing EEPROM read/write operations with wear-level tracking.
- Generating USB HID reports and processing CDC commands.
- Calculating TOTP codes using integer arithmetic (no floating point required).